Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55663 - in sandbox/numeric_adaptor/libs/numeric_adaptor: . example
From: barend.gehrels_at_[hidden]
Date: 2009-08-19 05:37:13


Author: barendgehrels
Date: 2009-08-19 05:37:13 EDT (Wed, 19 Aug 2009)
New Revision: 55663
URL: http://svn.boost.org/trac/boost/changeset/55663

Log:
Removed old samples
Removed:
   sandbox/numeric_adaptor/libs/numeric_adaptor/example/heron.cpp
   sandbox/numeric_adaptor/libs/numeric_adaptor/sample.cpp
   sandbox/numeric_adaptor/libs/numeric_adaptor/sample.sln
   sandbox/numeric_adaptor/libs/numeric_adaptor/sample.vcproj

Deleted: sandbox/numeric_adaptor/libs/numeric_adaptor/example/heron.cpp
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/example/heron.cpp 2009-08-19 05:37:13 EDT (Wed, 19 Aug 2009)
+++ (empty file)
@@ -1,66 +0,0 @@
-// Numeric Adaptor Library testing suite
-//
-// Copyright Barend Gehrels 2009, Geodan Holding B.V. Amsterdam, the Netherlands.
-// Copyright Bruno Lalande 2009
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <boost/numeric_adaptor/numeric_adaptor.hpp>
-#include <boost/numeric_adaptor/ieee_policy.hpp>
-
-#if defined(HAVE_GMP)
-# include <boost/numeric_adaptor/gmp_policy.hpp>
-#endif
-
-#if defined(HAVE_CLN)
-# include <boost/numeric_adaptor/cln_policy.hpp>
-#endif
-
-
-using namespace boost::numeric_adaptor;
-
-
-template <typename T, typename Policy>
-void heron(std::string const& header, T const& ta, T const& tb, T const& tc)
-{
- typedef numeric_adaptor<Policy> num;
-
- num a = ta;
- num b = tb;
- num c = tc;
- num s = (a + b + c) / num(2.0);
- num C = num::sqrt(s * (s - a) * (s - b) * (s - c));
- std::cout << header << ": " << "C = " << T(C) << std::endl;
-}
-
-
-int main()
-{
- try
- {
- heron<std::string, ieee_policy<float> > ("float / string", "31622.77662", "0.000023", "31622.77661");
- heron<std::string, ieee_policy<double> >("double / string", "31622.77662", "0.000023", "31622.77661");
-
-#if defined(HAVE_CLN)
- heron<std::string, cln_policy>("CLN / string", "31622.77662", "0.000023", "31622.77661");
-#endif
-
-#if defined(HAVE_GMP)
- heron<std::string, gmp_policy>("GMP / string", "31622.77662", "0.000023", "31622.77661");
-#endif
-
-
- }
- catch(std::exception const& e)
- {
- std::cout << "Exception: " << e.what() << std::endl;
- }
- catch(...)
- {
- std::cout << "Exception, unknown" << std::endl;
- }
-
- return 0;
-};

Deleted: sandbox/numeric_adaptor/libs/numeric_adaptor/sample.cpp
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/sample.cpp 2009-08-19 05:37:13 EDT (Wed, 19 Aug 2009)
+++ (empty file)
@@ -1,149 +0,0 @@
-// Numeric Adaptor Library
-//
-// Copyright Barend Gehrels 2009, Geodan Holding B.V. Amsterdam, the Netherlands.
-// Copyright Bruno Lalande 2009
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-#include <iostream>
-#include <iomanip>
-#include <string>
-#include <boost/numeric_adaptor/numeric_adaptor.hpp>
-#include <boost/numeric_adaptor/ieee_policy.hpp>
-
-#if defined(HAVE_GMP)
-# include <boost/numeric_adaptor/gmp_policy.hpp>
-#endif
-
-#if defined(HAVE_CLN)
-# include <boost/numeric_adaptor/cln_policy.hpp>
-#endif
-
-
-
-template <typename T, typename Num>
-void sample1(std::string const& header, T const& t_a, T const& t_b, T const& t_c)
-{
- std::cout << std::endl << "---" << header << std::endl;
- Num a = t_a;
- Num b = t_b;
- Num a_plus_b = a + b;
-
- //T t3 = a_plus_b; // does NOT compile for strings
- std::cout << "a + b: " << T(a_plus_b) << std::endl;
-
- Num c = t_c;
- Num par = (a + b) * c;
- std::cout << "(a + b) c: " << T(par) << std::endl;
- par = a + b * c;
- std::cout << "a + bc: " << T(par) << std::endl;
-
- Num sqrt_a_plus_b = Num::sqrt(a_plus_b);
- std::cout << "sqrt(a+b): " << T(sqrt_a_plus_b) << std::endl;
-
- // Calc the hypot function
- Num hypot_b_c = Num::hypot(b, c);
- std::cout << "hypot: " << T(hypot_b_c) << std::endl;
- std::cout << "hypot2: " << T(Num::sqrt(b * b + c * c)) << std::endl;
-}
-
-
-
-
-template <typename T, typename Num>
-void sample2(
-{
- std::cout << std::endl << "---" << header << std::endl;
-
- // Conversion from int
- Num n = 4;
- std::cout << T(n);
-
- // Assignment from T
- Num t = c1;
- n = t;
- std::cout << " " << T(n) << std::endl;
-
- Num v1 = c1;
- Num v2 = c2;
- if (v1 > v2)
- {
- std::cout << "v1 > v2" << std::endl;
- }
- if (v1 < v2)
- {
- std::cout << "v1 < v2" << std::endl;
- }
- if (v1 == v2)
- {
- std::cout << "v1 == v2" << std::endl;
- }
-
- Num v7 = Num::cos(v1);
- std::cout << "cos: " << T(v7) << std::endl;
- v7 = Num::abs(v7);
- std::cout << "abs: " << T(v7) << std::endl;
- v7 = Num::sin(v1);
- std::cout << "sin: " << T(v7) << std::endl;
-
-}
-
-void long_double_issue()
-{
- long double ld = 2.0000000002;
- std::cout << "Strange: " << sizeof(long double) << " " << double(ld) << std::endl;
- double d = 2.0000000002;
- std::cout << "OK: " << sizeof(double) << " " << d << std::endl;
-}
-
-
-int main()
-{
-
- using namespace boost::numeric_adaptor;
-
- mpf_set_default_prec(128);
- std::cout << std::setprecision(18);
-
- long_double_issue();
-
- sample1<std::string, numeric_adaptor<gmp_policy> >("use string, calculate with gmp",
- "2.000000000002", "3.000000000003", "4.00000000004");
- sample1<std::string, numeric_adaptor<cln_policy> >("use string, calculate with cln",
- "2.000000000002", "3.000000000003", "4.00000000004");
- sample1<double, numeric_adaptor<ieee_policy<long double> > >("use double, calculate with ieee/long double",
- 2.0000000000002, 3.000000000003, 4.00000000004);
-
- double a = 2.0000000002;
- double b = 3.0000000003;
- double c = 4.0000000004;
-
-
-
- sample2<float, numeric_adaptor<ieee_policy<float> > >("use float, calculate with float", a, b, c);
- sample2<float, numeric_adaptor<ieee_policy<double> > >("use float, calculate with double", a, b, c);
- sample2<double, numeric_adaptor<ieee_policy<double> > >("use double, calculate with double", a, b, c);
-
-
-#if ! defined(_MSC_VER)
- sample2<double, numeric_adaptor<gmp_policy> >("use double, calculate with gmp", a, b, c);
- sample2<double, numeric_adaptor<cln_policy> >("use double, calculate with CLN", a, b, c);
-#endif
-
-
- {
- double a = -3;
- double b = -4;
- std::cout << hypot(a, b) << std::endl;
- std::cout << boost::math::hypot(a, b) << std::endl;
-
- double rat = a / b;
- double h = b * sqrt(1 + rat*rat);
- std::cout << h << std::endl;
-
- }
-
- return 0;
-}

Deleted: sandbox/numeric_adaptor/libs/numeric_adaptor/sample.sln
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/sample.sln 2009-08-19 05:37:13 EDT (Wed, 19 Aug 2009)
+++ (empty file)
@@ -1,19 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample", "sample.vcproj", "{D61419DF-8BE9-4B3B-B541-FD5F17F47E5E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D61419DF-8BE9-4B3B-B541-FD5F17F47E5E}.Debug|Win32.ActiveCfg = Debug|Win32
- {D61419DF-8BE9-4B3B-B541-FD5F17F47E5E}.Debug|Win32.Build.0 = Debug|Win32
- {D61419DF-8BE9-4B3B-B541-FD5F17F47E5E}.Release|Win32.ActiveCfg = Release|Win32
- {D61419DF-8BE9-4B3B-B541-FD5F17F47E5E}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal

Deleted: sandbox/numeric_adaptor/libs/numeric_adaptor/sample.vcproj
==============================================================================
--- sandbox/numeric_adaptor/libs/numeric_adaptor/sample.vcproj 2009-08-19 05:37:13 EDT (Wed, 19 Aug 2009)
+++ (empty file)
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="sample"
- ProjectGUID="{D61419DF-8BE9-4B3B-B541-FD5F17F47E5E}"
- RootNamespace="sample"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)/sample"
- ConfigurationType="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="../..;.;&quot;c:\data\research\unbackupped\gmp\gmp-4.1&quot;"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;NO_CLN"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="0"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="gmpDebug.lib"
- LinkIncremental="2"
- AdditionalLibraryDirectories="c:\data\research\unbackupped\gmp\lib"
- GenerateDebugInformation="true"
- SubSystem="1"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)/sample"
- ConfigurationType="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="../..;.;&quot;c:\data\research\unbackupped\gmp\gmp-4.1&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_CLN"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="0"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="kernel32.lib gmp.lib"
- LinkIncremental="1"
- AdditionalLibraryDirectories="c:\data\research\unbackupped\gmp\lib"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\sample.cpp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk