diff options
Diffstat (limited to 'src/boost/libs/icl/example')
79 files changed, 9358 insertions, 0 deletions
diff --git a/src/boost/libs/icl/example/Jamfile.v2 b/src/boost/libs/icl/example/Jamfile.v2 new file mode 100644 index 00000000..009fa6d1 --- /dev/null +++ b/src/boost/libs/icl/example/Jamfile.v2 @@ -0,0 +1,159 @@ +# (C) Copyright 2008: Joachim Faulhaber +# Distributed under 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) + +# Examples that do not use boost_date_time +exe interval + : + interval_/interval.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe interval_container + : + interval_container_/interval_container.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe overlap_counter + : + overlap_counter_/overlap_counter.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe party + : + party_/party.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe std_copy + : + std_copy_/std_copy.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe std_transform + : + std_transform_/std_transform.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe custom_interval + : + custom_interval_/custom_interval.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe dynamic_interval + : + dynamic_interval_/dynamic_interval.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe static_interval + : + static_interval_/static_interval.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +# Examples using boost_date_time +exe boost_party + : + boost_party_/boost_party.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe partys_height_average + : + partys_height_average_/partys_height_average.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe partys_tallest_guests + : + partys_tallest_guests_/partys_tallest_guests.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe man_power + : + man_power_/man_power.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe month_and_week_grid + : + month_and_week_grid_/month_and_week_grid.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe user_groups + : + user_groups_/user_groups.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +# Projects +exe large_bitset + : + large_bitset_/large_bitset.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + + + +exe itvset_shell + : + itvset_shell_/itvset_shell.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + +exe splititvmap_shell + : + splititvmap_shell_/splititvmap_shell.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; + diff --git a/src/boost/libs/icl/example/boost_party_/Jamfile.v2 b/src/boost/libs/icl/example/boost_party_/Jamfile.v2 new file mode 100644 index 00000000..d4ebe150 --- /dev/null +++ b/src/boost/libs/icl/example/boost_party_/Jamfile.v2 @@ -0,0 +1,12 @@ +# (C) Copyright 2008: Joachim Faulhaber +# Distributed under 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) + +exe boost_party + : + boost_party.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; diff --git a/src/boost/libs/icl/example/boost_party_/boost_party.cpp b/src/boost/libs/icl/example/boost_party_/boost_party.cpp new file mode 100644 index 00000000..9f52b8ac --- /dev/null +++ b/src/boost/libs/icl/example/boost_party_/boost_party.cpp @@ -0,0 +1,137 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/** Example boost_party.cpp \file boost_party.cpp + \brief Generates an attendance history of a party by inserting into an interval_map. + Demonstrating <i>aggregate on overlap</i>. + + boost_party.cpp demonstrates the possibilities of an interval map + (interval_map or split_interval_map). Boost::posix_time::ptime is used as time + parameter. An interval_map maps intervals to a given content. In this case the + content is a set of party guests represented by their name strings. + + As time goes by, groups of people join the party and leave later in the evening. + So we add a time interval and a name set to the interval_map for the attendance + of each group of people, that come together and leave together. + + On every overlap of intervals, the corresponding name sets are accumulated. At + the points of overlap the intervals are split. The accumulation of content on + overlap of intervals is done via an operator += that has to be implemented + for the content parameter of the interval_map. + + Finally the interval_map contains the history of attendance and all points in + time, where the group of party guests changed. + + boost_party.cpp demonstrates a principle that we call + <b><em>aggregate on overlap</em></b>: + On insertion a value associated to the interval is aggregated (added) to those + values in the interval_map that overlap with the inserted value. + + There are two behavioral aspects to <b>aggregate on overlap</b>: a <em>decompositional + behavior</em> and a <em>accumulative behavior</em>. + + The <em>decompositional behavior</em> splits up intervals on the time dimension of the + interval_map so that the intervals change whenever associated values + change. + + The <em>accumulative behavior</em> accumulates associated values on every overlap of + an insertion for the associated values. + + \include boost_party_/boost_party.cpp +*/ +//[example_boost_party +// The next line includes <boost/date_time/posix_time/posix_time.hpp> +// and a few lines of adapter code. +#include <boost/icl/ptime.hpp> +#include <iostream> +#include <boost/icl/interval_map.hpp> + +using namespace std; +using namespace boost::posix_time; +using namespace boost::icl; + +// Type set<string> collects the names of party guests. Since std::set is +// a model of the itl's set concept, the concept provides an operator += +// that performs a set union on overlap of intervals. +typedef std::set<string> GuestSetT; + +void boost_party() +{ + GuestSetT mary_harry; + mary_harry.insert("Mary"); + mary_harry.insert("Harry"); + + GuestSetT diana_susan; + diana_susan.insert("Diana"); + diana_susan.insert("Susan"); + + GuestSetT peter; + peter.insert("Peter"); + + // A party is an interval map that maps time intervals to sets of guests + interval_map<ptime, GuestSetT> party; + + party.add( // add and element + make_pair( + interval<ptime>::right_open( + time_from_string("2008-05-20 19:30"), + time_from_string("2008-05-20 23:00")), + mary_harry)); + + party += // element addition can also be done via operator += + make_pair( + interval<ptime>::right_open( + time_from_string("2008-05-20 20:10"), + time_from_string("2008-05-21 00:00")), + diana_susan); + + party += + make_pair( + interval<ptime>::right_open( + time_from_string("2008-05-20 22:15"), + time_from_string("2008-05-21 00:30")), + peter); + + + interval_map<ptime, GuestSetT>::iterator it = party.begin(); + cout << "----- History of party guests -------------------------\n"; + while(it != party.end()) + { + interval<ptime>::type when = it->first; + // Who is at the party within the time interval 'when' ? + GuestSetT who = (*it++).second; + cout << when << ": " << who << endl; + } + +} + + +int main() +{ + cout << ">>Interval Container Library: Sample boost_party.cpp <<\n"; + cout << "-------------------------------------------------------\n"; + boost_party(); + return 0; +} + +// Program output: +/*----------------------------------------------------------------------------- +>>Interval Container Library: Sample boost_party.cpp << +------------------------------------------------------- +----- History of party guests ------------------------- +[2008-May-20 19:30:00, 2008-May-20 20:10:00): Harry Mary +[2008-May-20 20:10:00, 2008-May-20 22:15:00): Diana Harry Mary Susan +[2008-May-20 22:15:00, 2008-May-20 23:00:00): Diana Harry Mary Peter Susan +[2008-May-20 23:00:00, 2008-May-21 00:00:00): Diana Peter Susan +[2008-May-21 00:00:00, 2008-May-21 00:30:00): Peter +-----------------------------------------------------------------------------*/ +//] + diff --git a/src/boost/libs/icl/example/boost_party_/vc10_boost_party.vcxproj b/src/boost/libs/icl/example/boost_party_/vc10_boost_party.vcxproj new file mode 100644 index 00000000..aa0b5782 --- /dev/null +++ b/src/boost/libs/icl/example/boost_party_/vc10_boost_party.vcxproj @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-1907CC6613F8}</ProjectGuid> + <RootNamespace>Boost_party</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="boost_party.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/boost_party_/vc10_boost_party.vcxproj.filters b/src/boost/libs/icl/example/boost_party_/vc10_boost_party.vcxproj.filters new file mode 100644 index 00000000..b67258bd --- /dev/null +++ b/src/boost/libs/icl/example/boost_party_/vc10_boost_party.vcxproj.filters @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="boost_party.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/boost_party_/vc9_boost_party.vcproj b/src/boost/libs/icl/example/boost_party_/vc9_boost_party.vcproj new file mode 100644 index 00000000..e051a43b --- /dev/null +++ b/src/boost/libs/icl/example/boost_party_/vc9_boost_party.vcproj @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_boost_party" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-1907CC6613F8}" + RootNamespace="Boost_party" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\boost_party.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/custom_interval_/Jamfile.v2 b/src/boost/libs/icl/example/custom_interval_/Jamfile.v2 new file mode 100644 index 00000000..404abbc0 --- /dev/null +++ b/src/boost/libs/icl/example/custom_interval_/Jamfile.v2 @@ -0,0 +1,11 @@ +# (C) Copyright 2010: Joachim Faulhaber +# Distributed under 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) + +exe custom_interval + : + custom_interval.cpp + : + <include>../../.. + <include>$(BOOST_ROOT) + ; diff --git a/src/boost/libs/icl/example/custom_interval_/custom_interval.cpp b/src/boost/libs/icl/example/custom_interval_/custom_interval.cpp new file mode 100644 index 00000000..97ac731b --- /dev/null +++ b/src/boost/libs/icl/example/custom_interval_/custom_interval.cpp @@ -0,0 +1,103 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/** Example custom_interval.cpp \file custom_interval.cpp + \brief Shows how to use interval containers with own interval classes. + + There may be instances, where we want to use interval container with our + own user defined interval classes. Boost interval containers can be adapted + to your interval class by partial template specialisation. Only a few lines + of code are needed to achieve this. + + \include custom_interval_/custom_interval.cpp +*/ +//[example_custom_interval +#include <iostream> +#include <boost/icl/interval_set.hpp> + +using namespace std; +using namespace boost::icl; + +// Here is a typical class that may model intervals in your application. +class MyInterval +{ +public: + MyInterval(): _first(), _past(){} + MyInterval(int lo, int up): _first(lo), _past(up){} + int first()const{ return _first; } + int past ()const{ return _past; } +private: + int _first, _past; +}; + +namespace boost{ namespace icl +{ +// Class template interval_traits serves as adapter to register and customize your interval class +template<> +struct interval_traits< MyInterval > //1. Partially specialize interval_traits for +{ // your class MyInterval + //2. Define associated types + typedef MyInterval interval_type; //2.1 MyInterval will be the interval_type + typedef int domain_type; //2.2 The elements of the domain are ints + typedef std::less<int> domain_compare; //2.3 This is the way our element shall be ordered. + //3. Next we define the essential functions + // of the specialisation + //3.1 Construction of intervals + static interval_type construct(const domain_type& lo, const domain_type& up) + { return interval_type(lo, up); } + //3.2 Selection of values + static domain_type lower(const interval_type& inter_val){ return inter_val.first(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.past(); }; +}; + +template<> +struct interval_bound_type<MyInterval> //4. Finally we define the interval borders. +{ // Choose between static_open (lo..up) + typedef interval_bound_type type; // static_left_open (lo..up] + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_right_open);//[lo..up) +}; // and static_closed [lo..up] + +}} // namespace boost icl + +void custom_interval() +{ + // Now we can use class MyInterval with interval containers: + typedef interval_set<int, std::less, MyInterval> MyIntervalSet; + MyIntervalSet mySet; + mySet += MyInterval(1,9); + cout << mySet << endl; + mySet.subtract(3) -= 6; + cout << mySet << " subtracted 3 and 6\n"; + mySet ^= MyInterval(2,8); + cout << mySet << " flipped between 2 and 7\n"; +} + + +int main() +{ + cout << ">>Interval Container Library: Sample custom_interval.cpp <<\n"; + cout << "-----------------------------------------------------------\n"; + cout << "This program uses a user defined interval class:\n"; + custom_interval(); + return 0; +} + +// Program output: +/*----------------------------------------------------------------------------- +>>Interval Container Library: Sample custom_interval.cpp << +----------------------------------------------------------- +This program uses a user defined interval class: +{[1, 9)} +{[1, 3) [4, 6) [7, 9)} subtracted 3 and 6 +{[1,2) [3,4) [6,7) [8,9)} flipped between 2 and 7 +-----------------------------------------------------------------------------*/ +//] + diff --git a/src/boost/libs/icl/example/custom_interval_/vc10_custom_interval.vcxproj b/src/boost/libs/icl/example/custom_interval_/vc10_custom_interval.vcxproj new file mode 100644 index 00000000..a050dd38 --- /dev/null +++ b/src/boost/libs/icl/example/custom_interval_/vc10_custom_interval.vcxproj @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-1907CC6614F8}</ProjectGuid> + <RootNamespace>Custom_interval</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="custom_interval.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/custom_interval_/vc10_custom_interval.vcxproj.filters b/src/boost/libs/icl/example/custom_interval_/vc10_custom_interval.vcxproj.filters new file mode 100644 index 00000000..35e56b55 --- /dev/null +++ b/src/boost/libs/icl/example/custom_interval_/vc10_custom_interval.vcxproj.filters @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="custom_interval.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/custom_interval_/vc9_custom_interval.vcproj b/src/boost/libs/icl/example/custom_interval_/vc9_custom_interval.vcproj new file mode 100644 index 00000000..dd22704f --- /dev/null +++ b/src/boost/libs/icl/example/custom_interval_/vc9_custom_interval.vcproj @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_custom_interval" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-1907CC6614F8}" + RootNamespace="Custom_interval" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\custom_interval.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/dynamic_interval_/dynamic_interval.cpp b/src/boost/libs/icl/example/dynamic_interval_/dynamic_interval.cpp new file mode 100644 index 00000000..8cdb34c1 --- /dev/null +++ b/src/boost/libs/icl/example/dynamic_interval_/dynamic_interval.cpp @@ -0,0 +1,140 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example dynamic_interval.cpp \file dynamic_interval.cpp + \brief Intervals with dynamic interval bounds that can be changed at runtime. + + Intervals types with dynamic interval bounds can represent closed and + open interval borders. Interval borders are not static or fixed for + the type but may change due to computations in interval containers. + Dynamically bounded intervals are the library default for interval + parameters in interval containers. + + \include dynamic_interval_/dynamic_interval.cpp +*/ +//[example_dynamic_interval +#include <iostream> +#include <string> +#include <math.h> +#include <boost/type_traits/is_same.hpp> + +#include <boost/icl/interval_set.hpp> +#include <boost/icl/split_interval_set.hpp> +// Dynamically bounded intervals 'discrete_interval' and 'continuous_interval' +// are indirectly included via interval containers as library defaults. +#include "../toytime.hpp" +#include <boost/icl/rational.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +int main() +{ + cout << ">>Interval Container Library: Sample interval.cpp <<\n"; + cout << "----------------------------------------------------\n"; + + // Dynamically bounded intervals are the library default for + // interval parameters in interval containers. + BOOST_STATIC_ASSERT(( + boost::is_same< interval_set<int>::interval_type + , discrete_interval<int> >::value + )); + + + BOOST_STATIC_ASSERT(( + boost::is_same< interval_set<float>::interval_type + , continuous_interval<float> >::value + )); + + // As we can see the library default chooses the appropriate + // class template instance discrete_interval<T> or continuous_interval<T> + // dependent on the domain_type T. The library default for intervals + // is also available via the template 'interval': + BOOST_STATIC_ASSERT(( + boost::is_same< interval<int>::type + , discrete_interval<int> >::value + )); + + BOOST_STATIC_ASSERT(( + boost::is_same< interval<float>::type + , continuous_interval<float> >::value + )); + + // template interval also provides static functions for the four border types + + interval<int>::type int_interval = interval<int>::closed(3, 7); + interval<double>::type sqrt_interval = interval<double>::right_open(1/sqrt(2.0), sqrt(2.0)); + interval<string>::type city_interval = interval<string>::left_open("Barcelona", "Boston"); + interval<Time>::type time_interval = interval<Time>::open(Time(monday,8,30), Time(monday,17,20)); + + cout << "----- Dynamically bounded intervals ----------------------------------------\n"; + cout << " discrete_interval<int> : " << int_interval << endl; + cout << "continuous_interval<double>: " << sqrt_interval << " does " + << string(contains(sqrt_interval, sqrt(2.0))?"":"NOT") + << " contain sqrt(2)" << endl; + cout << "continuous_interval<string>: " << city_interval << " does " + << string(contains(city_interval,"Barcelona")?"":"NOT") + << " contain 'Barcelona'" << endl; + cout << "continuous_interval<string>: " << city_interval << " does " + << string(contains(city_interval, "Berlin")?"":"NOT") + << " contain 'Berlin'" << endl; + cout << " discrete_interval<Time> : " << time_interval << "\n\n"; + + // Using dynamically bounded intervals allows to apply operations + // with intervals and also with elements on all interval containers + // including interval containers of continuous domain types: + + interval<rational<int> >::type unit_interval + = interval<rational<int> >::right_open(rational<int>(0), rational<int>(1)); + interval_set<rational<int> > unit_set(unit_interval); + interval_set<rational<int> > ratio_set(unit_set); + ratio_set -= rational<int>(1,3); // Subtract 1/3 from the set + + cout << "----- Manipulation of single values in continuous sets ---------------------\n"; + cout << "1/3 subtracted from [0..1) : " << ratio_set << endl; + cout << "The set does " << string(contains(ratio_set, rational<int>(1,3))?"":"NOT") + << " contain '1/3'" << endl; + ratio_set ^= unit_set; + cout << "Flipping the holey set : " << ratio_set << endl; + cout << "yields the subtracted : 1/3\n\n"; + + // Of course we can use interval types that are different from the + // library default by explicit instantiation: + split_interval_set<int, std::less, closed_interval<Time> > intuitive_times; + // Interval set 'intuitive_times' uses statically bounded closed intervals + intuitive_times += closed_interval<Time>(Time(monday, 9,00), Time(monday, 10,59)); + intuitive_times += closed_interval<Time>(Time(monday, 10,00), Time(monday, 11,59)); + cout << "----- Here we are NOT using the library default for intervals --------------\n"; + cout << intuitive_times << endl; + + return 0; +} + +// Program output: +//>>Interval Container Library: Sample interval.cpp << +//---------------------------------------------------- +//----- Dynamically bounded intervals ---------------------------------------- +// discrete_interval<int> : [3,7] +//continuous_interval<double>: [0.707107,1.41421) does NOT contain sqrt(2) +//continuous_interval<string>: (Barcelona,Boston] does NOT contain 'Barcelona' +//continuous_interval<string>: (Barcelona,Boston] does contain 'Berlin' +// discrete_interval<Time> : (mon:08:30,mon:17:20) +// +//----- Manipulation of single values in continuous sets --------------------- +//1/3 subtracted from [0..1) : {[0/1,1/3)(1/3,1/1)} +//The set does NOT contain '1/3' +//Flipping the holey set : {[1/3,1/3]} +//yields the subtracted : 1/3 +// +//----- Here we are NOT using the library default for intervals -------------- +//{[mon:09:00,mon:09:59][mon:10:00,mon:10:59][mon:11:00,mon:11:59]} +//] + diff --git a/src/boost/libs/icl/example/dynamic_interval_/vc10_dynamic_interval.vcxproj b/src/boost/libs/icl/example/dynamic_interval_/vc10_dynamic_interval.vcxproj new file mode 100644 index 00000000..a7aeb73a --- /dev/null +++ b/src/boost/libs/icl/example/dynamic_interval_/vc10_dynamic_interval.vcxproj @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EE61B7EF-EC45-4165-8B59-FD5B7D3A9F7C}</ProjectGuid> + <RootNamespace>Dynamic_interval</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="dynamic_interval.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\dynamic_interval.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/dynamic_interval_/vc10_dynamic_interval.vcxproj.filters b/src/boost/libs/icl/example/dynamic_interval_/vc10_dynamic_interval.vcxproj.filters new file mode 100644 index 00000000..baf45cf3 --- /dev/null +++ b/src/boost/libs/icl/example/dynamic_interval_/vc10_dynamic_interval.vcxproj.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="dynamic_interval.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\dynamic_interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/dynamic_interval_/vc9_dynamic_interval.vcproj b/src/boost/libs/icl/example/dynamic_interval_/vc9_dynamic_interval.vcproj new file mode 100644 index 00000000..126807a8 --- /dev/null +++ b/src/boost/libs/icl/example/dynamic_interval_/vc9_dynamic_interval.vcproj @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_dynamic_interval" + ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}" + RootNamespace="Dynamic_interval" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\dynamic_interval.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\dynamic_interval.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/interval_/interval.cpp b/src/boost/libs/icl/example/interval_/interval.cpp new file mode 100644 index 00000000..5e91c26d --- /dev/null +++ b/src/boost/libs/icl/example/interval_/interval.cpp @@ -0,0 +1,111 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example interval.cpp \file interval.cpp + \brief Intervals for integral and continuous instance types. + Closed and open interval borders. + + Much of the library code deals with intervals which are implemented + by interval class templates. This program gives a very short samlpe of + different interval instances. + + \include interval_/interval.cpp +*/ +//[example_interval +#include <iostream> +#include <string> +#include <math.h> + +// Dynamically bounded intervals +#include <boost/icl/discrete_interval.hpp> +#include <boost/icl/continuous_interval.hpp> + +// Statically bounded intervals +#include <boost/icl/right_open_interval.hpp> +#include <boost/icl/left_open_interval.hpp> +#include <boost/icl/closed_interval.hpp> +#include <boost/icl/open_interval.hpp> + +#include "../toytime.hpp" +#include <boost/icl/rational.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +int main() +{ + cout << ">>Interval Container Library: Sample interval.cpp <<\n"; + cout << "----------------------------------------------------\n"; + + // Class template discrete_interval can be used for discrete data types + // like integers, date and time and other types that have a least steppable + // unit. + discrete_interval<int> int_interval + = construct<discrete_interval<int> >(3, 7, interval_bounds::closed()); + + // Class template continuous_interval can be used for continuous data types + // like double, boost::rational or strings. + continuous_interval<double> sqrt_interval + = construct<continuous_interval<double> >(1/sqrt(2.0), sqrt(2.0)); + //interval_bounds::right_open() is default + continuous_interval<string> city_interval + = construct<continuous_interval<string> >("Barcelona", "Boston", interval_bounds::left_open()); + + discrete_interval<Time> time_interval + = construct<discrete_interval<Time> >(Time(monday,8,30), Time(monday,17,20), + interval_bounds::open()); + + cout << "Dynamically bounded intervals:\n"; + cout << " discrete_interval<int>: " << int_interval << endl; + cout << "continuous_interval<double>: " << sqrt_interval << " does " + << string(contains(sqrt_interval, sqrt(2.0))?"":"NOT") + << " contain sqrt(2)" << endl; + cout << "continuous_interval<string>: " << city_interval << " does " + << string(contains(city_interval,"Barcelona")?"":"NOT") + << " contain 'Barcelona'" << endl; + cout << "continuous_interval<string>: " << city_interval << " does " + << string(contains(city_interval, "Berlin")?"":"NOT") + << " contain 'Berlin'" << endl; + cout << " discrete_interval<Time>: " << time_interval << "\n\n"; + + // There are statically bounded interval types with fixed interval borders + right_open_interval<string> fix_interval1; // You will probably use one kind of static intervals + // right_open_intervals are recommended. + closed_interval<unsigned int> fix_interval2; // ... static closed, left_open and open intervals + left_open_interval<float> fix_interval3; // are implemented for sake of completeness but + open_interval<short> fix_interval4; // are of minor practical importance. + + right_open_interval<rational<int> > range1(rational<int>(0,1), rational<int>(2,3)); + right_open_interval<rational<int> > range2(rational<int>(1,3), rational<int>(1,1)); + + // This middle third of the unit interval [0,1) + cout << "Statically bounded interval:\n"; + cout << "right_open_interval<rational<int>>: " << (range1 & range2) << endl; + + return 0; +} + +// Program output: + +//>>Interval Container Library: Sample interval.cpp << +//---------------------------------------------------- +//Dynamically bounded intervals +// discrete_interval<int>: [3,7] +//continuous_interval<double>: [0.707107,1.41421) does NOT contain sqrt(2) +//continuous_interval<string>: (Barcelona,Boston] does NOT contain 'Barcelona' +//continuous_interval<string>: (Barcelona,Boston] does contain 'Berlin' +// discrete_interval<Time>: (mon:08:30,mon:17:20) +// +//Statically bounded interval +//right_open_interval<rational<int>>: [1/3,2/3) + +//] + diff --git a/src/boost/libs/icl/example/interval_/vc10_interval.vcxproj b/src/boost/libs/icl/example/interval_/vc10_interval.vcxproj new file mode 100644 index 00000000..90facd63 --- /dev/null +++ b/src/boost/libs/icl/example/interval_/vc10_interval.vcxproj @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EE61B7EF-EC45-4165-8B59-FD5B7D2A9F7C}</ProjectGuid> + <RootNamespace>Interval</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="interval.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/interval_/vc10_interval.vcxproj.filters b/src/boost/libs/icl/example/interval_/vc10_interval.vcxproj.filters new file mode 100644 index 00000000..fec5755d --- /dev/null +++ b/src/boost/libs/icl/example/interval_/vc10_interval.vcxproj.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="interval.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/interval_/vc9_interval.vcproj b/src/boost/libs/icl/example/interval_/vc9_interval.vcproj new file mode 100644 index 00000000..0520587d --- /dev/null +++ b/src/boost/libs/icl/example/interval_/vc9_interval.vcproj @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_interval" + ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}" + RootNamespace="Interval" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\interval.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/interval_container_/interval_container.cpp b/src/boost/libs/icl/example/interval_container_/interval_container.cpp new file mode 100644 index 00000000..0be197ad --- /dev/null +++ b/src/boost/libs/icl/example/interval_container_/interval_container.cpp @@ -0,0 +1,107 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example interval_container.cpp \file interval_container.cpp + + \brief Demonstrates basic characteristics of interval container objects. + + \include interval_container_/interval_container.cpp +*/ +//[example_interval_container +#include <iostream> +#include <boost/icl/interval_set.hpp> +#include <boost/icl/separate_interval_set.hpp> +#include <boost/icl/split_interval_set.hpp> +#include <boost/icl/split_interval_map.hpp> +#include "../toytime.hpp" + +using namespace std; +using namespace boost::icl; + +void interval_container_basics() +{ + interval<Time>::type night_and_day(Time(monday, 20,00), Time(tuesday, 20,00)); + interval<Time>::type day_and_night(Time(tuesday, 7,00), Time(wednesday, 7,00)); + interval<Time>::type next_morning(Time(wednesday, 7,00), Time(wednesday,10,00)); + interval<Time>::type next_evening(Time(wednesday,18,00), Time(wednesday,21,00)); + + // An interval set of type interval_set joins intervals that that overlap or touch each other. + interval_set<Time> joinedTimes; + joinedTimes.insert(night_and_day); + joinedTimes.insert(day_and_night); //overlapping in 'day' [07:00, 20.00) + joinedTimes.insert(next_morning); //touching + joinedTimes.insert(next_evening); //disjoint + + cout << "Joined times :" << joinedTimes << endl; + + // A separate interval set of type separate_interval_set joins intervals that that + // overlap but it preserves interval borders that just touch each other. You may + // represent time grids like the months of a year as a split_interval_set. + separate_interval_set<Time> separateTimes; + separateTimes.insert(night_and_day); + separateTimes.insert(day_and_night); //overlapping in 'day' [07:00, 20.00) + separateTimes.insert(next_morning); //touching + separateTimes.insert(next_evening); //disjoint + + cout << "Separate times:" << separateTimes << endl; + + // A split interval set of type split_interval_set preserves all interval + // borders. On insertion of overlapping intervals the intervals in the + // set are split up at the interval borders of the inserted interval. + split_interval_set<Time> splitTimes; + splitTimes += night_and_day; + splitTimes += day_and_night; //overlapping in 'day' [07:00, 20:00) + splitTimes += next_morning; //touching + splitTimes += next_evening; //disjoint + + cout << "Split times :\n" << splitTimes << endl; + + // A split interval map splits up inserted intervals on overlap and aggregates the + // associated quantities via the operator += + split_interval_map<Time, int> overlapCounter; + overlapCounter += make_pair(night_and_day,1); + overlapCounter += make_pair(day_and_night,1); //overlapping in 'day' [07:00, 20.00) + overlapCounter += make_pair(next_morning, 1); //touching + overlapCounter += make_pair(next_evening, 1); //disjoint + + cout << "Split times overlap counted:\n" << overlapCounter << endl; + + // An interval map joins touching intervals, if associated values are equal + interval_map<Time, int> joiningOverlapCounter; + joiningOverlapCounter = overlapCounter; + cout << "Times overlap counted:\n" << joiningOverlapCounter << endl; +} + +int main() +{ + cout << ">>Interval Container Library: Sample interval_container.cpp <<\n"; + cout << "--------------------------------------------------------------\n"; + interval_container_basics(); + return 0; +} + + +// Program output: +/* ---------------------------------------------------------------------------- +>>Interval Container Library: Sample interval_container.cpp << +-------------------------------------------------------------- +Joined times :[mon:20:00,wed:10:00)[wed:18:00,wed:21:00) +Separate times:[mon:20:00,wed:07:00)[wed:07:00,wed:10:00)[wed:18:00,wed:21:00) +Split times : +[mon:20:00,tue:07:00)[tue:07:00,tue:20:00)[tue:20:00,wed:07:00) +[wed:07:00,wed:10:00)[wed:18:00,wed:21:00) +Split times overlap counted: +{([mon:20:00,tue:07:00)->1)([tue:07:00,tue:20:00)->2)([tue:20:00,wed:07:00)->1) +([wed:07:00,wed:10:00)->1)([wed:18:00,wed:21:00)->1)} +Times overlap counted: +{([mon:20:00,tue:07:00)->1)([tue:07:00,tue:20:00)->2)([tue:20:00,wed:10:00)->1) +([wed:18:00,wed:21:00)->1)} +-----------------------------------------------------------------------------*/ +//] diff --git a/src/boost/libs/icl/example/interval_container_/vc10_interval_container.vcxproj b/src/boost/libs/icl/example/interval_container_/vc10_interval_container.vcxproj new file mode 100644 index 00000000..ff76a883 --- /dev/null +++ b/src/boost/libs/icl/example/interval_container_/vc10_interval_container.vcxproj @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-E91A07F9DD81}</ProjectGuid> + <RootNamespace>interval_container</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="interval_container.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_set.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_set.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\separate_interval_set.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_set.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/interval_container_/vc10_interval_container.vcxproj.filters b/src/boost/libs/icl/example/interval_container_/vc10_interval_container.vcxproj.filters new file mode 100644 index 00000000..16d24297 --- /dev/null +++ b/src/boost/libs/icl/example/interval_container_/vc10_interval_container.vcxproj.filters @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="interval_container.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\separate_interval_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/interval_container_/vc9_interval_container.vcproj b/src/boost/libs/icl/example/interval_container_/vc9_interval_container.vcproj new file mode 100644 index 00000000..8020e113 --- /dev/null +++ b/src/boost/libs/icl/example/interval_container_/vc9_interval_container.vcproj @@ -0,0 +1,230 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_interval_container" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-E91A07F9DD81}" + RootNamespace="interval_container" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\interval_container.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_set.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_set.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\separate_interval_set.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\split_interval_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\split_interval_set.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/itvset_shell_/itvset_shell.cpp b/src/boost/libs/icl/example/itvset_shell_/itvset_shell.cpp new file mode 100644 index 00000000..553678d7 --- /dev/null +++ b/src/boost/libs/icl/example/itvset_shell_/itvset_shell.cpp @@ -0,0 +1,132 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/*-----------------------------------------------------------------------------+ +itvset_shell.cpp provides a simple test shells for interval sets. +The shell also gives you a good idea how interval container are working. ++-----------------------------------------------------------------------------*/ +#include <iostream> + +#include <boost/icl/split_interval_set.hpp> +#include <boost/icl/split_interval_map.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +void instructions() +{ + cout << "+++++ Test shell for interval set +++++\n"; + cout << "Type: q e or 0 to quit\n"; + cout << "Type: + for insertions\n"; + cout << "Type: - for subtraction\n"; + cout << "Type: j to join contiguous intervals\n"; + cout << "Type: s to compute total size\n"; +} + +void wrongInput() +{ + cout << "Wrong Input ------------------\n"; + instructions(); +} + + +template <class SetTV> +void setTestShell() +{ + SetTV m1; + + try { + char cmd = 'b'; + typename SetTV::domain_type lwb = typename SetTV::domain_type(); + typename SetTV::domain_type upb = typename SetTV::domain_type(); + + instructions(); + + for(;;) + { + cout << "> "; + cin >> cmd ; + + switch(cmd) + { + case 'q': + case 'e': + case '0': cout << "good bye\n"; return; + case '+': + { + cout << "input: lwb upb >> "; + cin >> lwb >> upb; + typename SetTV::interval_type itv + = typename SetTV::interval_type(lwb,upb); + // SetTV::IntervalTD itv = rightOpenInterval(lwb,upb); + m1.insert(itv); + + cout << "+" << itv << " =" << endl; + cout << "{" << m1 << "}" << endl; + + } + break; + case '-': + { + cout << "input: lwb upb >> "; + cin >> lwb >> upb; + typename SetTV::interval_type itv + = typename SetTV::interval_type(lwb,upb); + // m1.subtract(itv); + SetTV tmp; + tmp.insert(itv); + m1 -= tmp; + + cout << "-" << itv << " =" << endl; + cout << "{" << m1 << "}" << endl; + + } + break; + case 'j': + { + icl::join(m1); + cout << "{" << m1 << "}" << endl; + } + break; + case 's': + { + cout << "size = " << m1.size() << endl; + } + break; + + default: wrongInput(); + } + } + + } + catch (exception& e) + { + cout << "itvset_shell: exception caught: " << endl + << e.what() << endl; + } + catch (...) + { + cout << "itvset_shell: unknown exception caught" << endl; + } +} + + + + +int main() +{ + cout << ">>Interval Container Library: Test itvset_shell.cpp <<\n"; + cout << "------------------------------------------------------\n"; + setTestShell< interval_set<int> >(); + + return 0; +} + diff --git a/src/boost/libs/icl/example/itvset_shell_/vc9_itvset_shell.vcproj b/src/boost/libs/icl/example/itvset_shell_/vc9_itvset_shell.vcproj new file mode 100644 index 00000000..c301ad4a --- /dev/null +++ b/src/boost/libs/icl/example/itvset_shell_/vc9_itvset_shell.vcproj @@ -0,0 +1,214 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_itvset_shell" + ProjectGUID="{FC32CF3E-293A-4576-A5C2-9373AECAF5BB}" + RootNamespace="vc9_itvset_shell" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\itvset_shell.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_set.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + <File + RelativePath=".\ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/large_bitset_/bits.hpp b/src/boost/libs/icl/example/large_bitset_/bits.hpp new file mode 100644 index 00000000..6f04aec4 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/bits.hpp @@ -0,0 +1,77 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET_BITS_HPP_JOFA_091019 +#define BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET_BITS_HPP_JOFA_091019 +//[mini_bits_includes + // These includes are needed ... +#include <string> // for conversion to output and to +#include <boost/icl/type_traits/has_set_semantics.hpp>//declare that bits has the + // behavior of a set. +//] + +namespace mini +{ +//[mini_bits_class_bits +template<class NaturalT> class bits +{ +public: + typedef NaturalT word_type; + static const int digits = std::numeric_limits<NaturalT>::digits; + static const word_type w1 = static_cast<NaturalT>(1) ; + + bits():_bits(){} + explicit bits(word_type value):_bits(value){} + + word_type word()const{ return _bits; } + bits& operator |= (const bits& value){_bits |= value._bits; return *this;} + bits& operator &= (const bits& value){_bits &= value._bits; return *this;} + bits& operator ^= (const bits& value){_bits ^= value._bits; return *this;} + bits operator ~ ()const { return bits(~_bits); } + bool operator < (const bits& value)const{return _bits < value._bits;} + bool operator == (const bits& value)const{return _bits == value._bits;} + + bool contains(word_type element)const{ return ((w1 << element) & _bits) != 0; } + std::string as_string(const char off_on[2] = " 1")const; + +private: + word_type _bits; +}; +//] + +template<class NaturalT> +std::string bits<NaturalT>::as_string(const char off_on[2])const +{ + std::string sequence; + for(int bit=0; bit < digits; bit++) + sequence += contains(bit) ? off_on[1] : off_on[0]; + return sequence; +} + +} // mini + +//[mini_bits_is_set +namespace boost { namespace icl +{ + template<class NaturalT> + struct is_set<mini::bits<NaturalT> > + { + typedef is_set<mini::bits<NaturalT> > type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<class NaturalT> + struct has_set_semantics<mini::bits<NaturalT> > + { + typedef has_set_semantics<mini::bits<NaturalT> > type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; +}} +//] + +#endif diff --git a/src/boost/libs/icl/example/large_bitset_/large_bitset.cpp b/src/boost/libs/icl/example/large_bitset_/large_bitset.cpp new file mode 100644 index 00000000..99f3c7d3 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/large_bitset.cpp @@ -0,0 +1,168 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example large_bitset.cpp \file large_bitset.cpp + \brief Shows a bitset class that combines interval and bitset compression + in order to represent very large bitsets efficiently. + + Example large_bitset.cpp demonstrates the usage of a large_bitset class + template that is implemented as an interval_map of bitsets. The idea is + to combine interval compression and bitset compression. Large uninterrupted + runs of bits are represented by intervals (interval compression). Local + nests of varying bitsequences are represented by associated bitests + (bitset compression). + + Find a commented sample implementation in the boost book documentation + <a href="http://www.joachim-faulhaber.de/boost_itl/doc/libs/icl/doc/html/boost_itl/projects.html#boost_itl.projects.large_bitset"> + here</a>. + + \include large_bitset_/large_bitset.cpp +*/ +#if defined(_MSC_VER) +#pragma warning(disable:4244) // Msvc warns on some operations that are needed +#pragma warning(disable:4245) // in this example - we're working on bit level. +#endif // So we intentionally disable them. + +//[large_bitset_cpp_includes +#include <limits> +#include "large_bitset.hpp" + +using namespace std; +using namespace boost; +using namespace boost::icl; +using namespace mini; +//] + + +//[large_bitset_test_large_set_all +void test_large() +{ + const nat64 much = 0xffffffffffffffffull; + large_bitset<> venti; // ... the largest, I can think of ;) + venti += discrete_interval<nat64>(0, much); + + cout << "----- Test function test_large() -----------------------------------------------\n"; + cout << "We have just turned on the awesome amount of 18,446,744,073,709,551,616 bits ;-)\n"; + venti.show_segments(); + //] + + //[large_bitset_test_large_erase_last + cout << "---- Let's swich off the very last bit -----------------------------------------\n"; + venti -= much; + venti.show_segments(); + + cout << "---- Venti is plenty ... let's do something small: A tall ----------------------\n\n"; +} +//] + +//[large_bitset_test_small +void test_small() +{ + large_bitset<nat32, bits8> tall; // small is tall ... + // ... because even this 'small' large_bitset + // can represent up to 2^32 == 4,294,967,296 bits. + + cout << "----- Test function test_small() -----------\n"; + cout << "-- Switch on all bits in range [0,64] ------\n"; + tall += discrete_interval<nat>(0, 64); + tall.show_segments(); + cout << "--------------------------------------------\n"; + + cout << "-- Turn off bits: 25,27,28 -----------------\n"; + + (((tall -= 25) -= 27) -= 28) ; + tall.show_segments(); + cout << "--------------------------------------------\n"; + + cout << "-- Flip bits in range [24,30) --------------\n"; + tall ^= discrete_interval<nat>::right_open(24,30); + tall.show_segments(); + cout << "--------------------------------------------\n"; + + cout << "-- Remove the first 10 bits ----------------\n"; + tall -= discrete_interval<nat>::right_open(0,10); + tall.show_segments(); + + cout << "-- Remove even bits in range [0,72) --------\n"; + int bit; + for(bit=0; bit<72; bit++) if(!(bit%2)) tall -= bit; + tall.show_segments(); + + cout << "-- Set odd bits in range [0,72) --------\n"; + for(bit=0; bit<72; bit++) if(bit%2) tall += bit; + tall.show_segments(); + + cout << "--------------------------------------------\n\n"; + +} +//] + +//[large_bitset_test_picturesque +void test_picturesque() +{ + typedef large_bitset<nat, bits8> Bit8Set; + + Bit8Set square, stare; + square += discrete_interval<nat>(0,8); + for(int i=1; i<5; i++) + { + square += 8*i; + square += 8*i+7; + } + + square += discrete_interval<nat>(41,47); + + cout << "----- Test function test_picturesque() -----\n"; + cout << "-------- empty face: " + << square.interval_count() << " intervals -----\n"; + square.show_matrix(" *"); + + stare += 18; stare += 21; + stare += discrete_interval<nat>(34,38); + + cout << "-------- compressed smile: " + << stare.interval_count() << " intervals -----\n"; + stare.show_matrix(" *"); + + cout << "-------- staring bitset: " + << (square + stare).interval_count() << " intervals -----\n"; + (square + stare).show_matrix(" *"); + + cout << "--------------------------------------------\n"; +} +//] + +template<class NatT, class BitsT> +void test_set() +{ + const NatT much = (numeric_limits<NatT>::max)(); + + large_bitset<NatT, BitsT> venti; //the largest, I can think of + venti += discrete_interval<NatT>(0, much); + + cout << "--------------------------------------------------------------------------------\n"; + venti.show_segments(); + + venti -= much; + cout << "--------------------------------------------------------------------------------\n"; + venti.show_segments(); +} + + + +int main() +{ + cout << ">>Interval Container Library: Sample large_bitset.cpp <<\n"; + cout << "--------------------------------------------------------\n"; + test_large(); + test_small(); + test_picturesque(); + //test_set<nat64,bits64>(); + return 0; +} + diff --git a/src/boost/libs/icl/example/large_bitset_/large_bitset.hpp b/src/boost/libs/icl/example/large_bitset_/large_bitset.hpp new file mode 100644 index 00000000..35d6e634 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/large_bitset.hpp @@ -0,0 +1,213 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET__LARGE_BITSET_HPP_JOFA_091019 +#define BOOST_LIBS_ICL_EXAMPLE_LARGE_BITSET__LARGE_BITSET_HPP_JOFA_091019 + +//[large_bitset_includes +#include <iostream> // to organize output +#include <limits> // limits and associated constants +#include <boost/operators.hpp> // to define operators with minimal effort +#include "meta_log.hpp" // a meta logarithm +#include "bits.hpp" // a minimal bitset implementation +#include <boost/icl/interval_map.hpp> // base of large bitsets + +namespace mini // minimal implementations for example projects +{ +//] + +//[large_bitset_natural_typedefs +typedef unsigned char nat8; // nati i: number bits +typedef unsigned short nat16; +typedef unsigned long nat32; +typedef unsigned long long nat64; +typedef unsigned long nat; + +typedef bits<nat8> bits8; +typedef bits<nat16> bits16; +typedef bits<nat32> bits32; +typedef bits<nat64> bits64; +//] + +//[large_bitset_class_template_header +template +< + typename DomainT = nat64, + typename BitSetT = bits64, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class large_bitset + : boost::equality_comparable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + , boost::less_than_comparable< large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + + , boost::addable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + , boost::orable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + , boost::subtractable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + , boost::andable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + , boost::xorable < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc> + + , boost::addable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT + , boost::orable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT + , boost::subtractable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT + , boost::andable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT + , boost::xorable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, DomainT + + , boost::addable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare) + , boost::orable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare) + , boost::subtractable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare) + , boost::andable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare) + , boost::xorable2 < large_bitset<DomainT,BitSetT,Compare,Interval,Alloc>, ICL_INTERVAL_TYPE(Interval,DomainT,Compare) + > > > > > > > > > > > > > > > > > + //^ & - | + ^ & - | + ^ & - | + < == + //segment element container +//] +{ +public: + //[large_bitset_associated_types + typedef boost::icl::interval_map + <DomainT, BitSetT, boost::icl::partial_absorber, + std::less, boost::icl::inplace_bit_add, boost::icl::inplace_bit_and> interval_bitmap_type; + + typedef DomainT domain_type; + typedef DomainT element_type; + typedef BitSetT bitset_type; + typedef typename BitSetT::word_type word_type; + typedef typename interval_bitmap_type::interval_type interval_type; + typedef typename interval_bitmap_type::value_type value_type; + //] +//[large_bitset_operators +public: + bool operator ==(const large_bitset& rhs)const { return _map == rhs._map; } + bool operator < (const large_bitset& rhs)const { return _map < rhs._map; } + + large_bitset& operator +=(const large_bitset& rhs) {_map += rhs._map; return *this;} + large_bitset& operator |=(const large_bitset& rhs) {_map |= rhs._map; return *this;} + large_bitset& operator -=(const large_bitset& rhs) {_map -= rhs._map; return *this;} + large_bitset& operator &=(const large_bitset& rhs) {_map &= rhs._map; return *this;} + large_bitset& operator ^=(const large_bitset& rhs) {_map ^= rhs._map; return *this;} + + large_bitset& operator +=(const element_type& rhs) {return add(interval_type(rhs)); } + large_bitset& operator |=(const element_type& rhs) {return add(interval_type(rhs)); } + large_bitset& operator -=(const element_type& rhs) {return subtract(interval_type(rhs)); } + large_bitset& operator &=(const element_type& rhs) {return intersect(interval_type(rhs));} + large_bitset& operator ^=(const element_type& rhs) {return flip(interval_type(rhs)); } + + large_bitset& operator +=(const interval_type& rhs){return add(rhs); } + large_bitset& operator |=(const interval_type& rhs){return add(rhs); } + large_bitset& operator -=(const interval_type& rhs){return subtract(rhs); } + large_bitset& operator &=(const interval_type& rhs){return intersect(rhs);} + large_bitset& operator ^=(const interval_type& rhs){return flip(rhs); } + //] + //[large_bitset_fundamental_functions + large_bitset& add (const interval_type& rhs){return segment_apply(&large_bitset::add_, rhs);} + large_bitset& subtract (const interval_type& rhs){return segment_apply(&large_bitset::subtract_, rhs);} + large_bitset& intersect(const interval_type& rhs){return segment_apply(&large_bitset::intersect_,rhs);} + large_bitset& flip (const interval_type& rhs){return segment_apply(&large_bitset::flip_, rhs);} + //] + + //[large_bitset_demo_functions + size_t interval_count()const { return boost::icl::interval_count(_map); } + + void show_segments()const + { + for(typename interval_bitmap_type::const_iterator it_ = _map.begin(); + it_ != _map.end(); ++it_) + { + interval_type itv = it_->first; + bitset_type bits = it_->second; + std::cout << itv << "->" << bits.as_string("01") << std::endl; + } + } + + void show_matrix(const char off_on[2] = " 1")const + { + using namespace boost; + typename interval_bitmap_type::const_iterator iter = _map.begin(); + while(iter != _map.end()) + { + element_type fst = icl::first(iter->first), lst = icl::last(iter->first); + for(element_type chunk = fst; chunk <= lst; chunk++) + std::cout << iter->second.as_string(off_on) << std::endl; + ++iter; + } + } + //] + +//[large_bitset_impl_constants +private: // Example value + static const word_type // 8-bit case + digits = std::numeric_limits // -------------------------------------------------------------- + <word_type>::digits , // 8 Size of the associated bitsets + divisor = digits , // 8 Divisor to find intervals for values + last = digits-1 , // 7 Last bit (0 based) + shift = log2_<divisor>::value , // 3 To express the division as bit shift + w1 = static_cast<word_type>(1) , // Helps to avoid static_casts for long long + mask = divisor - w1 , // 7=11100000 Helps to express the modulo operation as bit_and + all = ~static_cast<word_type>(0), // 255=11111111 Helps to express a complete associated bitset + top = w1 << (digits-w1) ; // 128=00000001 Value of the most significant bit of associated bitsets + // !> Note: Most signigicant bit on the right. + //] + //[large_bitset_segment_combiner + typedef void (large_bitset::*segment_combiner)(element_type, element_type, bitset_type); + //] + + //[large_bitset_bitset_filler + static word_type from_lower_to(word_type bit){return bit==last ? all : (w1<<(bit+w1))-w1;} + static word_type to_upper_from(word_type bit){return bit==last ? top : ~((w1<<bit)-w1); } + //] + + //[large_bitset_segment_apply + large_bitset& segment_apply(segment_combiner combine, const interval_type& operand) + { + using namespace boost; + if(icl::is_empty(operand)) + return *this; + // same as + element_type base = icl::first(operand) >> shift, // icl::first(operand) / divisor + ceil = icl::last (operand) >> shift; // icl::last (operand) / divisor + word_type base_rest = icl::first(operand) & mask , // icl::first(operand) % divisor + ceil_rest = icl::last (operand) & mask ; // icl::last (operand) % divisor + + if(base == ceil) // [first, last] are within one bitset (chunk) + (this->*combine)(base, base+1, bitset_type( to_upper_from(base_rest) + & from_lower_to(ceil_rest))); + else // [first, last] spread over more than one bitset (chunk) + { + element_type mid_low = base_rest == 0 ? base : base+1, // first element of mid part + mid_up = ceil_rest == all ? ceil+1 : ceil ; // last element of mid part + + if(base_rest > 0) // Bitset of base interval has to be filled from base_rest to last + (this->*combine)(base, base+1, bitset_type(to_upper_from(base_rest))); + if(ceil_rest < all) // Bitset of ceil interval has to be filled from first to ceil_rest + (this->*combine)(ceil, ceil+1, bitset_type(from_lower_to(ceil_rest))); + if(mid_low < mid_up) // For the middle part all bits have to set. + (this->*combine)(mid_low, mid_up, bitset_type(all)); + } + return *this; + } + //] + + //[large_bitmap_combiners + void add_(DomainT lo, DomainT up, BitSetT bits){_map += value_type(interval_type::right_open(lo,up), bits);} + void subtract_(DomainT lo, DomainT up, BitSetT bits){_map -= value_type(interval_type::right_open(lo,up), bits);} + void intersect_(DomainT lo, DomainT up, BitSetT bits){_map &= value_type(interval_type::right_open(lo,up), bits);} + void flip_(DomainT lo, DomainT up, BitSetT bits){_map ^= value_type(interval_type::right_open(lo,up), bits);} + //] + +//[large_bitmap_impl_map +private: + interval_bitmap_type _map; +//] +}; + +} // mini +#endif + + diff --git a/src/boost/libs/icl/example/large_bitset_/meta_log.hpp b/src/boost/libs/icl/example/large_bitset_/meta_log.hpp new file mode 100644 index 00000000..5eb868f5 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/meta_log.hpp @@ -0,0 +1,26 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +namespace mini // minimal implementations for example projects +{ +// A meta implementation of an the logarithm function on integrals +template <size_t Argument, size_t Base=2> +struct log_{ enum { value = 1 + log_<Argument/Base, Base>::value }; }; + +template <size_t Base>struct log_<1, Base>{ enum { value = 0 }; }; +template <size_t Base>struct log_<0, Base>{ enum { value = 0 }; }; + +template <size_t Argument> +struct log2_{ enum { value = log_<Argument, 2>::value }; }; + +template <size_t Argument> +struct power2_{ enum { value = 1 << Argument }; }; + +} // namespace mini + diff --git a/src/boost/libs/icl/example/large_bitset_/vc10_large_bitset.vcxproj b/src/boost/libs/icl/example/large_bitset_/vc10_large_bitset.vcxproj new file mode 100644 index 00000000..b474b623 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/vc10_large_bitset.vcxproj @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-AA054DD53759}</ProjectGuid> + <RootNamespace>Large_bitset</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;../../boost_1_35_0/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;../../boost_1_35_0/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="large_bitset.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="bits.hpp" /> + <ClInclude Include="large_bitset.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/large_bitset_/vc10_large_bitset.vcxproj.filters b/src/boost/libs/icl/example/large_bitset_/vc10_large_bitset.vcxproj.filters new file mode 100644 index 00000000..489593d9 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/vc10_large_bitset.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="large_bitset.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="bits.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="large_bitset.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/large_bitset_/vc9_large_bitset.vcproj b/src/boost/libs/icl/example/large_bitset_/vc9_large_bitset.vcproj new file mode 100644 index 00000000..355532e8 --- /dev/null +++ b/src/boost/libs/icl/example/large_bitset_/vc9_large_bitset.vcproj @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_large_bitset" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-AA054DD53759}" + RootNamespace="Large_bitset" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\large_bitset.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\bits.hpp" + > + </File> + <File + RelativePath=".\large_bitset.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/man_power_/man_power.cpp b/src/boost/libs/icl/example/man_power_/man_power.cpp new file mode 100644 index 00000000..a095d0e3 --- /dev/null +++ b/src/boost/libs/icl/example/man_power_/man_power.cpp @@ -0,0 +1,190 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example man_power.cpp \file man_power.cpp + \brief Using set style operators to compute with interval sets and maps. + + Interval sets and maps can be filled and manipulated using + set style operation like union (+=), difference (-=) and intersection + (&=). + + In this example 'man_power' a number of those operations are + demonstrated in the process of calculation the available working + times (man-power) of a company's employees accounting for weekends, + holidays, sickness times and vacations. + + \include man_power_/man_power.cpp +*/ +//[example_man_power +// The next line includes <boost/gregorian/date.hpp> +// and a few lines of adapter code. +#include <boost/icl/gregorian.hpp> +#include <iostream> +#include <boost/icl/discrete_interval.hpp> +#include <boost/icl/interval_map.hpp> + +using namespace std; +using namespace boost::gregorian; +using namespace boost::icl; + + +// Function weekends returns the interval_set of weekends that are contained in +// the date interval 'scope' +interval_set<date> weekends(const discrete_interval<date>& scope) +{ + interval_set<date> weekends; + + date cur_weekend_sat + = first(scope) + + days(days_until_weekday(first(scope), greg_weekday(Saturday))) + - weeks(1); + week_iterator week_iter(cur_weekend_sat); + + for(; week_iter <= last(scope); ++week_iter) + weekends += discrete_interval<date>::right_open(*week_iter, *week_iter + days(2)); + + weekends &= scope; // cut off the surplus + + return weekends; +} + +// The available working time for the employees of a company is calculated +// for a period of 3 months accounting for weekends and holidays. +// The available daily working time for the employees is calculated +// using interval_sets and interval_maps demonstrating a number of +// addition, subtraction and intersection operations. +void man_power() +{ + date someday = from_string("2008-08-01"); + date thenday = someday + months(3); + + discrete_interval<date> scope = discrete_interval<date>::right_open(someday, thenday); + + // ------------------------------------------------------------------------ + // (1) In a first step, the regular working times are computed for the + // company within the given scope. From all available days, the weekends + // and holidays have to be subtracted: + interval_set<date> worktime(scope); + // Subtract the weekends + worktime -= weekends(scope); + // Subtract holidays + worktime -= from_string("2008-10-03"); //German reunification ;) + + // company holidays (fictitious ;) + worktime -= discrete_interval<date>::closed(from_string("2008-08-18"), + from_string("2008-08-22")); + + //------------------------------------------------------------------------- + // (2) Now we calculate the individual work times for some employees + //------------------------------------------------------------------------- + // In the company works Claudia. + // This is the map of her regular working times: + interval_map<date,int> claudias_working_hours; + + // Claudia is working 8 hours a day. So the next statement says + // that every day in the whole scope is mapped to 8 hours worktime. + claudias_working_hours += make_pair(scope, 8); + + // But Claudia only works 8 hours on regular working days so we do + // an intersection of the interval_map with the interval_set worktime: + claudias_working_hours &= worktime; + + // Yet, in addition Claudia has her own absence times like + discrete_interval<date> claudias_seminar (from_string("2008-09-16"), + from_string("2008-09-24"), + interval_bounds::closed()); + discrete_interval<date> claudias_vacation(from_string("2008-08-01"), + from_string("2008-08-14"), + interval_bounds::closed()); + + interval_set<date> claudias_absence_times(claudias_seminar); + claudias_absence_times += claudias_vacation; + + // All the absence times have to subtracted from the map of her working times + claudias_working_hours -= claudias_absence_times; + + //------------------------------------------------------------------------- + // Claudia's boss is Bodo. He only works part time. + // This is the map of his regular working times: + interval_map<date,int> bodos_working_hours; + + // Bodo is working 4 hours a day. + bodos_working_hours += make_pair(scope, 4); + + // Bodo works only on regular working days + bodos_working_hours &= worktime; + + // Bodos additional absence times + discrete_interval<date> bodos_flu(from_string("2008-09-19"), from_string("2008-09-29"), + interval_bounds::closed()); + discrete_interval<date> bodos_vacation(from_string("2008-08-15"), from_string("2008-09-03"), + interval_bounds::closed()); + + interval_set<date> bodos_absence_times(bodos_flu); + bodos_absence_times += bodos_vacation; + + // All the absence times have to be subtracted from the map of his working times + bodos_working_hours -= bodos_absence_times; + + //------------------------------------------------------------------------- + // (3) Finally we want to calculate the available manpower of the company + // for the selected time scope: This is done by adding up the employees + // working time maps: + interval_map<date,int> manpower; + manpower += claudias_working_hours; + manpower += bodos_working_hours; + + + cout << first(scope) << " - " << last(scope) + << " available man-power:" << endl; + cout << "---------------------------------------------------------------\n"; + + for(interval_map<date,int>::iterator it = manpower.begin(); + it != manpower.end(); it++) + { + cout << first(it->first) << " - " << last(it->first) + << " -> " << it->second << endl; + } +} + +int main() +{ + cout << ">>Interval Container Library: Sample man_power.cpp <<\n"; + cout << "---------------------------------------------------------------\n"; + man_power(); + return 0; +} + +// Program output: +/* +>>Interval Container Library: Sample man_power.cpp << +--------------------------------------------------------------- +2008-Aug-01 - 2008-Oct-31 available man-power: +--------------------------------------------------------------- +2008-Aug-01 - 2008-Aug-01 -> 4 +2008-Aug-04 - 2008-Aug-08 -> 4 +2008-Aug-11 - 2008-Aug-14 -> 4 +2008-Aug-15 - 2008-Aug-15 -> 8 +2008-Aug-25 - 2008-Aug-29 -> 8 +2008-Sep-01 - 2008-Sep-03 -> 8 +2008-Sep-04 - 2008-Sep-05 -> 12 +2008-Sep-08 - 2008-Sep-12 -> 12 +2008-Sep-15 - 2008-Sep-15 -> 12 +2008-Sep-16 - 2008-Sep-18 -> 4 +2008-Sep-25 - 2008-Sep-26 -> 8 +2008-Sep-29 - 2008-Sep-29 -> 8 +2008-Sep-30 - 2008-Oct-02 -> 12 +2008-Oct-06 - 2008-Oct-10 -> 12 +2008-Oct-13 - 2008-Oct-17 -> 12 +2008-Oct-20 - 2008-Oct-24 -> 12 +2008-Oct-27 - 2008-Oct-31 -> 12 +*/ +//] + diff --git a/src/boost/libs/icl/example/man_power_/vc10_man_power.vcxproj b/src/boost/libs/icl/example/man_power_/vc10_man_power.vcxproj new file mode 100644 index 00000000..0be5958c --- /dev/null +++ b/src/boost/libs/icl/example/man_power_/vc10_man_power.vcxproj @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-04ED0F38E8C2}</ProjectGuid> + <RootNamespace>Party</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="man_power.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_set.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_set.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/man_power_/vc10_man_power.vcxproj.filters b/src/boost/libs/icl/example/man_power_/vc10_man_power.vcxproj.filters new file mode 100644 index 00000000..739b5e0b --- /dev/null +++ b/src/boost/libs/icl/example/man_power_/vc10_man_power.vcxproj.filters @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="man_power.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/man_power_/vc9_man_power.vcproj b/src/boost/libs/icl/example/man_power_/vc9_man_power.vcproj new file mode 100644 index 00000000..07cbc6a3 --- /dev/null +++ b/src/boost/libs/icl/example/man_power_/vc9_man_power.vcproj @@ -0,0 +1,228 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_man_power" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-04ED0F38E8C2}" + RootNamespace="Party" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\man_power.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_set.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_set.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/month_and_week_grid_/month_and_week_grid.cpp b/src/boost/libs/icl/example/month_and_week_grid_/month_and_week_grid.cpp new file mode 100644 index 00000000..ace4fe35 --- /dev/null +++ b/src/boost/libs/icl/example/month_and_week_grid_/month_and_week_grid.cpp @@ -0,0 +1,140 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example month_and_week_grid.cpp \file month_and_week_grid.cpp + \brief Creating and combining time grids. + + A split_interval_set preserves all interval borders on insertion + and intersection operations. So given a split_interval_set ... + \code + x = {[1, 3)} + x.add( [2, 4)) then + x == {[1,2)[2,3)[3,4)} + \endcode + ... using this property we can intersect splitting interval containers + in order to iterate over intervals accounting for all changes of + interval borders. + + In this example we provide an intersection of two split_interval_sets + representing a month and week time grid. + + \include month_and_week_grid_/month_and_week_grid.cpp +*/ +//[example_month_and_week_grid +// The next line includes <boost/gregorian/date.hpp> +// and a few lines of adapter code. +#include <boost/icl/gregorian.hpp> +#include <iostream> +#include <boost/icl/split_interval_set.hpp> + +using namespace std; +using namespace boost::gregorian; +using namespace boost::icl; + +typedef split_interval_set<boost::gregorian::date> date_grid; + +// This function splits a gregorian::date interval 'scope' into a month grid: +// For every month contained in 'scope' that month is contained as interval +// in the resulting split_interval_set. +date_grid month_grid(const discrete_interval<date>& scope) +{ + split_interval_set<date> month_grid; + + date frame_months_1st = first(scope).end_of_month() + days(1) - months(1); + month_iterator month_iter(frame_months_1st); + + for(; month_iter <= last(scope); ++month_iter) + month_grid += discrete_interval<date>::right_open(*month_iter, *month_iter + months(1)); + + month_grid &= scope; // cut off the surplus + + return month_grid; +} + +// This function splits a gregorian::date interval 'scope' into a week grid: +// For every week contained in 'scope' that month is contained as interval +// in the resulting split_interval_set. +date_grid week_grid(const discrete_interval<date>& scope) +{ + split_interval_set<date> week_grid; + + date frame_weeks_1st = first(scope) + days(days_until_weekday(first(scope), greg_weekday(Monday))) - weeks(1); + week_iterator week_iter(frame_weeks_1st); + + for(; week_iter <= last(scope); ++week_iter) + week_grid.insert(discrete_interval<date>::right_open(*week_iter, *week_iter + weeks(1))); + + week_grid &= scope; // cut off the surplus + + return week_grid; +} + +// For a period of two months, starting from today, the function +// computes a partitioning for months and weeks using intersection +// operator &= on split_interval_sets. +void month_and_time_grid() +{ + date someday = day_clock::local_day(); + date thenday = someday + months(2); + + discrete_interval<date> itv = discrete_interval<date>::right_open(someday, thenday); + + // Compute a month grid + date_grid month_and_week_grid = month_grid(itv); + // Intersection of the month and week grids: + month_and_week_grid &= week_grid(itv); + + cout << "interval : " << first(itv) << " - " << last(itv) + << " month and week partitions:" << endl; + cout << "---------------------------------------------------------------\n"; + + for(date_grid::iterator it = month_and_week_grid.begin(); + it != month_and_week_grid.end(); it++) + { + if(first(*it).day() == 1) + cout << "new month: "; + else if(first(*it).day_of_week()==greg_weekday(Monday)) + cout << "new week : " ; + else if(it == month_and_week_grid.begin()) + cout << "first day: " ; + cout << first(*it) << " - " << last(*it) << endl; + } +} + + +int main() +{ + cout << ">>Interval Container Library: Sample month_and_time_grid.cpp <<\n"; + cout << "---------------------------------------------------------------\n"; + month_and_time_grid(); + return 0; +} + +// Program output: +/* +>>Interval Container Library: Sample month_and_time_grid.cpp << +--------------------------------------------------------------- +interval : 2008-Jun-22 - 2008-Aug-21 month and week partitions: +--------------------------------------------------------------- +first day: 2008-Jun-22 - 2008-Jun-22 +new week : 2008-Jun-23 - 2008-Jun-29 +new week : 2008-Jun-30 - 2008-Jun-30 +new month: 2008-Jul-01 - 2008-Jul-06 +new week : 2008-Jul-07 - 2008-Jul-13 +new week : 2008-Jul-14 - 2008-Jul-20 +new week : 2008-Jul-21 - 2008-Jul-27 +new week : 2008-Jul-28 - 2008-Jul-31 +new month: 2008-Aug-01 - 2008-Aug-03 +new week : 2008-Aug-04 - 2008-Aug-10 +new week : 2008-Aug-11 - 2008-Aug-17 +new week : 2008-Aug-18 - 2008-Aug-21 +*/ +//] + diff --git a/src/boost/libs/icl/example/month_and_week_grid_/vc10_month_and_week_grid.vcxproj b/src/boost/libs/icl/example/month_and_week_grid_/vc10_month_and_week_grid.vcxproj new file mode 100644 index 00000000..1586b2c5 --- /dev/null +++ b/src/boost/libs/icl/example/month_and_week_grid_/vc10_month_and_week_grid.vcxproj @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-CDC290478F78}</ProjectGuid> + <RootNamespace>Party</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="month_and_week_grid.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_set.hpp" /> + </ItemGroup> + <ItemGroup> + <None Include="ReadMe.txt" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/month_and_week_grid_/vc10_month_and_week_grid.vcxproj.filters b/src/boost/libs/icl/example/month_and_week_grid_/vc10_month_and_week_grid.vcxproj.filters new file mode 100644 index 00000000..f4eb9f24 --- /dev/null +++ b/src/boost/libs/icl/example/month_and_week_grid_/vc10_month_and_week_grid.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="month_and_week_grid.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="ReadMe.txt" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/month_and_week_grid_/vc9_month_and_week_grid.vcproj b/src/boost/libs/icl/example/month_and_week_grid_/vc9_month_and_week_grid.vcproj new file mode 100644 index 00000000..f321dd99 --- /dev/null +++ b/src/boost/libs/icl/example/month_and_week_grid_/vc9_month_and_week_grid.vcproj @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_month_and_week_grid" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-CDC290478F78}" + RootNamespace="Party" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../bin/debug/" + IntermediateDirectory="../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../bin/release/" + IntermediateDirectory="../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\month_and_week_grid.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\split_interval_set.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + <File + RelativePath=".\ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/overlap_counter_/overlap_counter.cpp b/src/boost/libs/icl/example/overlap_counter_/overlap_counter.cpp new file mode 100644 index 00000000..df852e41 --- /dev/null +++ b/src/boost/libs/icl/example/overlap_counter_/overlap_counter.cpp @@ -0,0 +1,108 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example overlap_counter.cpp \file overlap_counter.cpp + + \brief The most simple application of an interval map: + Counting the overlaps of added intervals. + + The most basic application of an interval_map is a counter counting + the number of overlaps of intervals inserted into it. + + On could call an interval_map an aggregate on overlap machine. A very basic + aggregation is summation of an integer. A interval_map<int,int> maps + intervals of int to ints. + + If we insert a value pair (discrete_interval<int>(2,6), 1) into the interval_map, it + increases the content of all value pairs in the map by 1, if their interval + part overlaps with discrete_interval<int>(2,6). + + \include overlap_counter_/overlap_counter.cpp +*/ +//[example_overlap_counter +#include <iostream> +#include <boost/icl/split_interval_map.hpp> + +using namespace std; +using namespace boost::icl; + + +/* The most simple example of an interval_map is an overlap counter. + If intervals are added that are associated with the value 1, + all overlaps of added intervals are counted as a result in the + associated values. +*/ +typedef interval_map<int, int> OverlapCounterT; + +void print_overlaps(const OverlapCounterT& counter) +{ + for(OverlapCounterT::const_iterator it = counter.begin(); it != counter.end(); it++) + { + discrete_interval<int> itv = (*it).first; + int overlaps_count = (*it).second; + if(overlaps_count == 1) + cout << "in interval " << itv << " intervals do not overlap" << endl; + else + cout << "in interval " << itv << ": "<< overlaps_count << " intervals overlap" << endl; + } +} + +void overlap_counter() +{ + OverlapCounterT overlap_counter; + discrete_interval<int> inter_val; + + inter_val = discrete_interval<int>::right_open(4,8); + cout << "-- adding " << inter_val << " -----------------------------------------" << endl; + overlap_counter += make_pair(inter_val, 1); + print_overlaps(overlap_counter); + cout << "-----------------------------------------------------------" << endl; + + inter_val = discrete_interval<int>::right_open(6,9); + cout << "-- adding " << inter_val << " -----------------------------------------" << endl; + overlap_counter += make_pair(inter_val, 1); + print_overlaps(overlap_counter); + cout << "-----------------------------------------------------------" << endl; + + inter_val = discrete_interval<int>::right_open(1,9); + cout << "-- adding " << inter_val << " -----------------------------------------" << endl; + overlap_counter += make_pair(inter_val, 1); + print_overlaps(overlap_counter); + cout << "-----------------------------------------------------------" << endl; + +} + +int main() +{ + cout << ">>Interval Container Library: Sample overlap_counter.cpp <<\n"; + cout << "-----------------------------------------------------------\n"; + overlap_counter(); + return 0; +} + +// Program output: + +// >>Interval Container Library: Sample overlap_counter.cpp << +// ----------------------------------------------------------- +// -- adding [4,8) ----------------------------------------- +// in interval [4,8) intervals do not overlap +// ----------------------------------------------------------- +// -- adding [6,9) ----------------------------------------- +// in interval [4,6) intervals do not overlap +// in interval [6,8): 2 intervals overlap +// in interval [8,9) intervals do not overlap +// ----------------------------------------------------------- +// -- adding [1,9) ----------------------------------------- +// in interval [1,4) intervals do not overlap +// in interval [4,6): 2 intervals overlap +// in interval [6,8): 3 intervals overlap +// in interval [8,9): 2 intervals overlap +// ----------------------------------------------------------- +//] diff --git a/src/boost/libs/icl/example/overlap_counter_/vc10_overlap_counter.vcxproj b/src/boost/libs/icl/example/overlap_counter_/vc10_overlap_counter.vcxproj new file mode 100644 index 00000000..ed0bc63b --- /dev/null +++ b/src/boost/libs/icl/example/overlap_counter_/vc10_overlap_counter.vcxproj @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-D75FD6990B83}</ProjectGuid> + <RootNamespace>overlap_counter</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="overlap_counter.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/overlap_counter_/vc10_overlap_counter.vcxproj.filters b/src/boost/libs/icl/example/overlap_counter_/vc10_overlap_counter.vcxproj.filters new file mode 100644 index 00000000..0ecacfde --- /dev/null +++ b/src/boost/libs/icl/example/overlap_counter_/vc10_overlap_counter.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="overlap_counter.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/overlap_counter_/vc9_overlap_counter.vcproj b/src/boost/libs/icl/example/overlap_counter_/vc9_overlap_counter.vcproj new file mode 100644 index 00000000..6c5bc5f6 --- /dev/null +++ b/src/boost/libs/icl/example/overlap_counter_/vc9_overlap_counter.vcproj @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_overlap_counter" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-D75FD6990B83}" + RootNamespace="overlap_counter" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\overlap_counter.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/party_/party.cpp b/src/boost/libs/icl/example/party_/party.cpp new file mode 100644 index 00000000..df660500 --- /dev/null +++ b/src/boost/libs/icl/example/party_/party.cpp @@ -0,0 +1,109 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#include <iostream> +#include <boost/icl/interval_map.hpp> +#include "../toytime.hpp" + +using namespace std; +using namespace boost::icl; + +/** + Party.cpp demonstrates the possibilities of an interval map (interval_map or + split_interval_map). An interval_map maps intervals to a given content. In + this case the content is a set of party guests represented by their name + strings. + + As time goes by, groups of people join the party and leave later in the + evening. So we add a time interval and a name set to the interval_map for + the attendance of each group of people, that come together and leave + together. + + On every overlap of intervals, the corresponding name sets are accumulated. + At the points of overlap the intervals are split. The accumulation of content + on overlap of intervals is always done via an operator += that has to be + implemented for the content parameter of the interval_map. + + Finally the interval_map contains the history of attendance and all points + in time, where the group of party guests changed. + + Party.cpp demonstrates a principle that we call aggregate on overlap + (aggovering;) On insertion a value associated to the interval is aggregated + (added) to those values in the interval_map that overlap with the inserted + value. + + There are two behavioral aspects to aggovering: a decompositional behavior + and a accumulative behavior. + + The decompositional behavior splits up intervals on the time dimension of + the interval_map so that the intervals change whenever associated values + change. + + The accumulative behavior accumulates associated values on every overlap of + an insertion for the associated values. +*/ + +// Type set<string> collects the names of party guests. Since std::set is +// a model of the itl's set concept, the concept provides an operator += +// that performs a set union on overlap of intervals. +typedef std::set<string> GuestSetT; + +// 'Time' is the domain type the interval_map. It's key values are therefore +// time intervals. The content is the set of names: GuestSetT. + + +void party() +{ + GuestSetT mary_harry; + mary_harry.insert("Mary"); + mary_harry.insert("Harry"); + + GuestSetT diana_susan; + diana_susan.insert("Diana"); + diana_susan.insert("Susan"); + + GuestSetT peter; + peter.insert("Peter"); + + interval_map<Time, GuestSetT> party; + + party += make_pair( interval<Time>::right_open(Time(19,30), Time(23,00)), mary_harry); + party += make_pair( interval<Time>::right_open(Time(20,10), Time(monday,0,0)), diana_susan); + party += make_pair( interval<Time>::right_open(Time(22,15), Time(monday,0,30)), peter); + + interval_map<Time, GuestSetT>::iterator it = party.begin(); + while(it != party.end()) + { + discrete_interval<Time> when = it->first; + // Who is at the party within the time interval 'when' ? + GuestSetT who = (*it++).second; + cout << when << ": " << who << endl; + } +} + +int main() +{ + cout << ">>Interval Container Library: Sample party.cpp <<\n"; + cout << "-------------------------------------------------------\n"; + party(); + return 0; +} + +// Program output: + +// >>Interval Container Library: Sample party.cpp << +// ------------------------------------------------- +// [sun:19:30,sun:20:10): Harry Mary +// [sun:20:10,sun:22:15): Diana Harry Mary Susan +// [sun:22:15,sun:23:00): Diana Harry Mary Peter Susan +// [sun:23:00,mon:00:00): Diana Peter Susan +// [mon:00:00,mon:00:30): Peter + + diff --git a/src/boost/libs/icl/example/party_/vc10_party.vcxproj b/src/boost/libs/icl/example/party_/vc10_party.vcxproj new file mode 100644 index 00000000..1d6c16f9 --- /dev/null +++ b/src/boost/libs/icl/example/party_/vc10_party.vcxproj @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-AA054DD43759}</ProjectGuid> + <RootNamespace>Party</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;../../boost_1_35_0/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;../../boost_1_35_0/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="party.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/party_/vc10_party.vcxproj.filters b/src/boost/libs/icl/example/party_/vc10_party.vcxproj.filters new file mode 100644 index 00000000..b082c17e --- /dev/null +++ b/src/boost/libs/icl/example/party_/vc10_party.vcxproj.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="party.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/party_/vc9_party.vcproj b/src/boost/libs/icl/example/party_/vc9_party.vcproj new file mode 100644 index 00000000..f5a1072f --- /dev/null +++ b/src/boost/libs/icl/example/party_/vc9_party.vcproj @@ -0,0 +1,212 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_party" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-AA054DD43759}" + RootNamespace="Party" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib;../../boost_1_35_0/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\party.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/partys_height_average_/Jamfile.v2 b/src/boost/libs/icl/example/partys_height_average_/Jamfile.v2 new file mode 100644 index 00000000..014e8288 --- /dev/null +++ b/src/boost/libs/icl/example/partys_height_average_/Jamfile.v2 @@ -0,0 +1,12 @@ +# (C) Copyright 2008: Joachim Faulhaber +# Distributed under 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) + +exe partys_height_average + : + partys_height_average.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; diff --git a/src/boost/libs/icl/example/partys_height_average_/partys_height_average.cpp b/src/boost/libs/icl/example/partys_height_average_/partys_height_average.cpp new file mode 100644 index 00000000..a9af3fc2 --- /dev/null +++ b/src/boost/libs/icl/example/partys_height_average_/partys_height_average.cpp @@ -0,0 +1,134 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/** Example partys_height_average.cpp \file partys_height_average.cpp + \brief Using <i>aggregate on overlap</i> a history of height averages of + party guests is computed. + + In partys_height_average.cpp we compute yet another aggregation: + The average height of guests as it changes over time. This is done by + defining a class counted_sum that sums up heights and counts the number + of guests via an operator +=. + + Based on the operator += we can aggregate counted sums on addition + of interval value pairs into an interval_map. + + \include partys_height_average_/partys_height_average.cpp +*/ +//[example_partys_height_average +// The next line includes <boost/date_time/posix_time/posix_time.hpp> +// and a few lines of adapter code. +#include <boost/icl/ptime.hpp> +#include <iostream> +#include <boost/icl/interval_map.hpp> +#include <boost/icl/split_interval_map.hpp> + +using namespace std; +using namespace boost::posix_time; +using namespace boost::icl; + + +class counted_sum +{ +public: + counted_sum():_sum(0),_count(0){} + counted_sum(int sum):_sum(sum),_count(1){} + + int sum()const {return _sum;} + int count()const{return _count;} + double average()const{ return _count==0 ? 0.0 : _sum/static_cast<double>(_count); } + + counted_sum& operator += (const counted_sum& right) + { _sum += right.sum(); _count += right.count(); return *this; } + +private: + int _sum; + int _count; +}; + +bool operator == (const counted_sum& left, const counted_sum& right) +{ return left.sum()==right.sum() && left.count()==right.count(); } + + +void partys_height_average() +{ + interval_map<ptime, counted_sum> height_sums; + + height_sums += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 19:30"), + time_from_string("2008-05-20 23:00")), + counted_sum(165)); // Mary is 1,65 m tall. + + height_sums += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 19:30"), + time_from_string("2008-05-20 23:00")), + counted_sum(180)); // Harry is 1,80 m tall. + + height_sums += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 20:10"), + time_from_string("2008-05-21 00:00")), + counted_sum(170)); // Diana is 1,70 m tall. + + height_sums += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 20:10"), + time_from_string("2008-05-21 00:00")), + counted_sum(165)); // Susan is 1,65 m tall. + + height_sums += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 22:15"), + time_from_string("2008-05-21 00:30")), + counted_sum(200)); // Peters height is 2,00 m + + interval_map<ptime, counted_sum>::iterator height_sum_ = height_sums.begin(); + cout << "-------------- History of average guest height -------------------\n"; + while(height_sum_ != height_sums.end()) + { + discrete_interval<ptime> when = height_sum_->first; + + double height_average = (*height_sum_++).second.average(); + cout << setprecision(3) + << "[" << first(when) << " - " << upper(when) << ")" + << ": " << height_average <<" cm = " << height_average/30.48 << " ft" << endl; + } +} + + +int main() +{ + cout << ">>Interval Container Library: Sample partys_height_average.cpp <<\n"; + cout << "------------------------------------------------------------------\n"; + partys_height_average(); + return 0; +} + +// Program output: +/*----------------------------------------------------------------------------- +>>Interval Container Library: Sample partys_height_average.cpp << +------------------------------------------------------------------ +-------------- History of average guest height ------------------- +[2008-May-20 19:30:00 - 2008-May-20 20:10:00): 173 cm = 5.66 ft +[2008-May-20 20:10:00 - 2008-May-20 22:15:00): 170 cm = 5.58 ft +[2008-May-20 22:15:00 - 2008-May-20 23:00:00): 176 cm = 5.77 ft +[2008-May-20 23:00:00 - 2008-May-21 00:00:00): 178 cm = 5.85 ft +[2008-May-21 00:00:00 - 2008-May-21 00:30:00): 200 cm = 6.56 ft +-----------------------------------------------------------------------------*/ +//] + diff --git a/src/boost/libs/icl/example/partys_height_average_/vc10_partys_height_average.vcxproj b/src/boost/libs/icl/example/partys_height_average_/vc10_partys_height_average.vcxproj new file mode 100644 index 00000000..cd72b5ea --- /dev/null +++ b/src/boost/libs/icl/example/partys_height_average_/vc10_partys_height_average.vcxproj @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-1907CC6633F8}</ProjectGuid> + <RootNamespace>Partys_height_average</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="partys_height_average.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/partys_height_average_/vc10_partys_height_average.vcxproj.filters b/src/boost/libs/icl/example/partys_height_average_/vc10_partys_height_average.vcxproj.filters new file mode 100644 index 00000000..a4f45992 --- /dev/null +++ b/src/boost/libs/icl/example/partys_height_average_/vc10_partys_height_average.vcxproj.filters @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="partys_height_average.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/partys_height_average_/vc9_partys_height_average.vcproj b/src/boost/libs/icl/example/partys_height_average_/vc9_partys_height_average.vcproj new file mode 100644 index 00000000..8c981b07 --- /dev/null +++ b/src/boost/libs/icl/example/partys_height_average_/vc9_partys_height_average.vcproj @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_partys_height_average" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-1907CC6633F8}" + RootNamespace="Partys_height_average" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\partys_height_average.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/partys_tallest_guests_/Jamfile.v2 b/src/boost/libs/icl/example/partys_tallest_guests_/Jamfile.v2 new file mode 100644 index 00000000..375cf793 --- /dev/null +++ b/src/boost/libs/icl/example/partys_tallest_guests_/Jamfile.v2 @@ -0,0 +1,12 @@ +# (C) Copyright 2008: Joachim Faulhaber +# Distributed under 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) + +exe partys_tallest_guests + : + partys_tallest_guests.cpp + /boost/date_time//boost_date_time + : + <include>../../.. + <include>$(BOOST_ROOT) + ; diff --git a/src/boost/libs/icl/example/partys_tallest_guests_/partys_tallest_guests.cpp b/src/boost/libs/icl/example/partys_tallest_guests_/partys_tallest_guests.cpp new file mode 100644 index 00000000..ff1ae685 --- /dev/null +++ b/src/boost/libs/icl/example/partys_tallest_guests_/partys_tallest_guests.cpp @@ -0,0 +1,161 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/** Example partys_tallest_guests.cpp \file partys_tallest_guests.cpp + \brief Using <i>aggregate on overlap</i> the heights of the party's tallest + guests are computed. + + In partys_tallest_guests.cpp we use a different instantiation of + interval map templates to compute maxima of guest heights. + + Instead of aggregating groups of people attending the party in time + we aggregate the maximum of guest height for the time intervals. + + Using a joining interval_map results in a smaller map: All interval + value pairs are joined if the maximum does not change in time. Using + a split_interval_map results in a larger map: All splits of intervals + that occur due to entering and leaving of guests are preserved in + the split_interval_map. + + \include partys_tallest_guests_/partys_tallest_guests.cpp +*/ +//[example_partys_tallest_guests +// The next line includes <boost/date_time/posix_time/posix_time.hpp> +// and a few lines of adapter code. +#include <boost/icl/ptime.hpp> +#include <iostream> +#include <boost/icl/interval_map.hpp> +#include <boost/icl/split_interval_map.hpp> + +using namespace std; +using namespace boost::posix_time; +using namespace boost::icl; + + +// A party's height shall be defined as the maximum height of all guests ;-) +// The last parameter 'inplace_max' is a functor template that calls a max +// aggregation on overlap. +typedef interval_map<ptime, int, partial_absorber, less, inplace_max> + PartyHeightHistoryT; + +// Using a split_interval_map we preserve interval splittings that occurred via insertion. +typedef split_interval_map<ptime, int, partial_absorber, less, inplace_max> + PartyHeightSplitHistoryT; + +void partys_height() +{ + PartyHeightHistoryT tallest_guest; + + tallest_guest += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 19:30"), + time_from_string("2008-05-20 23:00")), + 180); // Mary & Harry: Harry is 1,80 m tall. + + tallest_guest += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 20:10"), + time_from_string("2008-05-21 00:00")), + 170); // Diana & Susan: Diana is 1,70 m tall. + + tallest_guest += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 22:15"), + time_from_string("2008-05-21 00:30")), + 200); // Peters height is 2,00 m + + PartyHeightHistoryT::iterator height_ = tallest_guest.begin(); + cout << "-------------- History of maximum guest height -------------------\n"; + while(height_ != tallest_guest.end()) + { + discrete_interval<ptime> when = height_->first; + // Of what height are the tallest guests within the time interval 'when' ? + int height = (*height_++).second; + cout << "[" << first(when) << " - " << upper(when) << ")" + << ": " << height <<" cm = " << height/30.48 << " ft" << endl; + } + +} + +// Next we are using a split_interval_map instead of a joining interval_map +void partys_split_height() +{ + PartyHeightSplitHistoryT tallest_guest; + + // adding an element can be done wrt. simple aggregate functions + // like e.g. min, max etc. in their 'inplace' or op= incarnation + tallest_guest += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 19:30"), + time_from_string("2008-05-20 23:00")), + 180); // Mary & Harry: Harry is 1,80 m tall. + + tallest_guest += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 20:10"), + time_from_string("2008-05-21 00:00")), + 170); // Diana & Susan: Diana is 1,70 m tall. + + tallest_guest += + make_pair( + discrete_interval<ptime>::right_open( + time_from_string("2008-05-20 22:15"), + time_from_string("2008-05-21 00:30")), + 200); // Peters height is 2,00 m + + PartyHeightSplitHistoryT::iterator height_ = tallest_guest.begin(); + cout << "\n"; + cout << "-------- Split History of maximum guest height -------------------\n"; + cout << "--- Same map as above but split for every interval insertion. ---\n"; + while(height_ != tallest_guest.end()) + { + discrete_interval<ptime> when = height_->first; + // Of what height are the tallest guests within the time interval 'when' ? + int height = (*height_++).second; + cout << "[" << first(when) << " - " << upper(when) << ")" + << ": " << height <<" cm = " << height/30.48 << " ft" << endl; + } + +} + + +int main() +{ + cout << ">>Interval Container Library: Sample partys_tallest_guests.cpp <<\n"; + cout << "------------------------------------------------------------------\n"; + partys_height(); + partys_split_height(); + return 0; +} + +// Program output: +/*----------------------------------------------------------------------------- +>>Interval Container Library: Sample partys_tallest_guests.cpp << +------------------------------------------------------------------ +-------------- History of maximum guest height ------------------- +[2008-May-20 19:30:00 - 2008-May-20 22:15:00): 180 cm = 5.90551 ft +[2008-May-20 22:15:00 - 2008-May-21 00:30:00): 200 cm = 6.56168 ft + +-------- Split History of maximum guest height ------------------- +--- Same map as above but split for every interval insertion. --- +[2008-May-20 19:30:00 - 2008-May-20 20:10:00): 180 cm = 5.90551 ft +[2008-May-20 20:10:00 - 2008-May-20 22:15:00): 180 cm = 5.90551 ft +[2008-May-20 22:15:00 - 2008-May-20 23:00:00): 200 cm = 6.56168 ft +[2008-May-20 23:00:00 - 2008-May-21 00:00:00): 200 cm = 6.56168 ft +[2008-May-21 00:00:00 - 2008-May-21 00:30:00): 200 cm = 6.56168 ft +-----------------------------------------------------------------------------*/ +//] + diff --git a/src/boost/libs/icl/example/partys_tallest_guests_/vc10_partys_tallest_guests.vcxproj b/src/boost/libs/icl/example/partys_tallest_guests_/vc10_partys_tallest_guests.vcxproj new file mode 100644 index 00000000..1c152fb8 --- /dev/null +++ b/src/boost/libs/icl/example/partys_tallest_guests_/vc10_partys_tallest_guests.vcxproj @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-1907CC6623F8}</ProjectGuid> + <RootNamespace>Partys_tallest_guests</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="partys_tallest_guests.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/partys_tallest_guests_/vc10_partys_tallest_guests.vcxproj.filters b/src/boost/libs/icl/example/partys_tallest_guests_/vc10_partys_tallest_guests.vcxproj.filters new file mode 100644 index 00000000..c1a93263 --- /dev/null +++ b/src/boost/libs/icl/example/partys_tallest_guests_/vc10_partys_tallest_guests.vcxproj.filters @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="partys_tallest_guests.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_base_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/partys_tallest_guests_/vc9_partys_tallest_guests.vcproj b/src/boost/libs/icl/example/partys_tallest_guests_/vc9_partys_tallest_guests.vcproj new file mode 100644 index 00000000..6bcbd49b --- /dev/null +++ b/src/boost/libs/icl/example/partys_tallest_guests_/vc9_partys_tallest_guests.vcproj @@ -0,0 +1,220 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_partys_tallest_guests" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-1907CC6623F8}" + RootNamespace="Partys_tallest_guests" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\partys_tallest_guests.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_base_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/splititvmap_shell_/splititvmap_shell.cpp b/src/boost/libs/icl/example/splititvmap_shell_/splititvmap_shell.cpp new file mode 100644 index 00000000..549486da --- /dev/null +++ b/src/boost/libs/icl/example/splititvmap_shell_/splititvmap_shell.cpp @@ -0,0 +1,131 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/*-----------------------------------------------------------------------------+ +splititvmap_shell.cpp provides a simple test shell for splitting interval maps. +The shell also gives you a good idea how interval container are working. ++-----------------------------------------------------------------------------*/ +#include <iostream> + +#include <boost/icl/split_interval_set.hpp> +#include <boost/icl/split_interval_map.hpp> +#include <boost/icl/interval_map.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +void instructions() +{ + cout << "+++++ Test shell for split interval map +++++\n"; + cout << "Type: q e or 0 to quit\n"; + cout << "Type: + for insertions\n"; + cout << "Type: - for subtraction of ([a,b],value)\n"; + cout << "Type: _ for subtraction of [a,b]\n"; + cout << "Type: j to join contiguous intervals\n"; + cout << "Type: s to compute total size\n"; +} + +void wrongInput() +{ + cout << "Wrong Input ------------------\n"; + instructions(); +} + + +template <class MapTV> +void mapTestShell() +{ + MapTV m1; + + try { + char cmd = 'b'; + typename MapTV::domain_type + lwb = typename MapTV::domain_type(), + upb = typename MapTV::domain_type(); + + typename MapTV::codomain_type + val = typename MapTV::codomain_type(); + + instructions(); + + for(;;) + { + cout << "> "; + cin >> cmd ; + + switch(cmd) + { + case 'q': + case 'e': + case '0': cout << "good bye\n"; return; + case '+': + { + cout << "input: lwb upb val >> "; + cin >> lwb >> upb >> val; + typename MapTV::interval_type + itv = typename MapTV::interval_type(lwb,upb); + m1 += make_pair(itv,val); + + cout << "+" << itv << " " << val << " =" << endl; + cout << "{" << m1 << "}" << endl; + + } + break; + case '-': + { + cout << "input: lwb upb val >> "; + cin >> lwb >> upb >> val; + typename MapTV::interval_type + itv = typename MapTV::interval_type(lwb,upb); + m1 -= make_pair(itv,val); + + cout << "-" << itv << " " << val << " =" << endl; + cout << "{" << m1 << "}" << endl; + + } + break; + case 'j': + { + icl::join(m1); + cout << "{" << m1 << "}" << endl; + } + break; + case 's': + { + cout << "size = " << m1.size() << endl; + } + break; + + default: wrongInput(); + } + } // end while + } + catch (exception& e) + { + cout << "splititvmap_shell: exception caught: " << endl + << e.what() << endl; + } + catch (...) + { + cout << "splititvmap_shell: unknown exception caught" << endl; + } +} + + +int main() +{ + cout << ">>Interval Container Library: Test splititvmap_shell.cpp <<\n"; + cout << "-----------------------------------------------------------\n"; + mapTestShell< interval_map<int, int> >(); + + return 0; +} + diff --git a/src/boost/libs/icl/example/splititvmap_shell_/vc9_splititvmap_shell.vcproj b/src/boost/libs/icl/example/splititvmap_shell_/vc9_splititvmap_shell.vcproj new file mode 100644 index 00000000..c24c304c --- /dev/null +++ b/src/boost/libs/icl/example/splititvmap_shell_/vc9_splititvmap_shell.vcproj @@ -0,0 +1,214 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_splititvmap_shell" + ProjectGUID="{639F6AD9-CD50-40BF-92B9-CC9DD069D65A}" + RootNamespace="splititvmap_shell" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/Debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\splititvmap_shell.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\split_interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + <File + RelativePath=".\ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/static_interval_/static_interval.cpp b/src/boost/libs/icl/example/static_interval_/static_interval.cpp new file mode 100644 index 00000000..6ea17ede --- /dev/null +++ b/src/boost/libs/icl/example/static_interval_/static_interval.cpp @@ -0,0 +1,123 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example static_interval.cpp \file static_interval.cpp + \brief Intervals with static interval bounds. + + Intervals types with static or fixed interval bounds. Statically + bounded intervals use up to 33% less memory than dynamically + bounded ones. Of the four possible statically bounded intervals types + right_open_intervals are the most important ones. We can switch the + library default to statically bounded intervals by defining + BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS. + + \include static_interval_/static_interval.cpp +*/ +//[example_static_interval +#include <iostream> +#include <string> +#include <math.h> +#include <boost/type_traits/is_same.hpp> + +// We can change the library default for the interval types by defining +#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS +// prior to other inluces from the icl. +// The interval type that is automatically used with interval +// containers then is the statically bounded right_open_interval. + +#include <boost/icl/interval_set.hpp> +#include <boost/icl/split_interval_set.hpp> +// The statically bounded interval type 'right_open_interval' +// is indirectly included via interval containers. + + +#include "../toytime.hpp" +#include <boost/icl/rational.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +int main() +{ + cout << ">> Interval Container Library: Sample static_interval.cpp <<\n"; + cout << "------------------------------------------------------------\n"; + + // Statically bounded intervals are the user defined library default for + // interval parameters in interval containers now. + BOOST_STATIC_ASSERT(( + boost::is_same< interval_set<int>::interval_type + , right_open_interval<int> >::value + )); + + BOOST_STATIC_ASSERT(( + boost::is_same< interval_set<float>::interval_type + , right_open_interval<float> >::value + )); + + // As we can see the library default both for discrete and continuous + // domain_types T is 'right_open_interval<T>'. + // The user defined library default for intervals is also available via + // the template 'interval': + BOOST_STATIC_ASSERT(( + boost::is_same< interval<int>::type + , right_open_interval<int> >::value + )); + + // Again we are declaring and initializing the four test intervals that have been used + // in the example 'interval' and 'dynamic_interval' + interval<int>::type int_interval = interval<int>::right_open(3, 8); // shifted the upper bound + interval<double>::type sqrt_interval = interval<double>::right_open(1/sqrt(2.0), sqrt(2.0)); + + // Interval ("Barcelona", "Boston"] can not be represented because there is no 'steppable next' on + // lower bound "Barcelona". Ok. this is a different interval: + interval<string>::type city_interval = interval<string>::right_open("Barcelona", "Boston"); + + // Toy Time is discrete again so we can transfrom open(Time(monday,8,30), Time(monday,17,20)) + // to right_open(Time(monday,8,31), Time(monday,17,20)) + interval<Time>::type time_interval = interval<Time>::right_open(Time(monday,8,31), Time(monday,17,20)); + + cout << "----- Statically bounded intervals ----------------------------------------\n"; + cout << "right_open_interval<int> : " << int_interval << endl; + cout << "right_open_interval<double>: " << sqrt_interval << " does " + << string(contains(sqrt_interval, sqrt(2.0))?"":"NOT") + << " contain sqrt(2)" << endl; + cout << "right_open_interval<string>: " << city_interval << " does " + << string(contains(city_interval,"Barcelona")?"":"NOT") + << " contain 'Barcelona'" << endl; + cout << "right_open_interval<string>: " << city_interval << " does " + << string(contains(city_interval, "Boston")?"":"NOT") + << " contain 'Boston'" << endl; + cout << "right_open_interval<Time> : " << time_interval << "\n\n"; + + // Using statically bounded intervals does not allows to apply operations + // with elements on all interval containers, if their domain_type is continuous. + // The code that follows is identical to example 'dynamic_interval'. Only 'internally' + // the library default for the interval template now is 'right_open_interval' + interval<rational<int> >::type unit_interval + = interval<rational<int> >::right_open(rational<int>(0), rational<int>(1)); + interval_set<rational<int> > unit_set(unit_interval); + interval_set<rational<int> > ratio_set(unit_set); + // ratio_set -= rational<int>(1,3); // This line will not compile, because we can not + // represent a singleton interval as right_open_interval. + return 0; +} + +// Program output: +//>> Interval Container Library: Sample static_interval.cpp << +//------------------------------------------------------------ +//----- Statically bounded intervals ---------------------------------------- +//right_open_interval<int> : [3,8) +//right_open_interval<double>: [0.707107,1.41421) does NOT contain sqrt(2) +//right_open_interval<string>: [Barcelona,Boston) does contain 'Barcelona' +//right_open_interval<string>: [Barcelona,Boston) does NOT contain 'Boston' +//right_open_interval<Time> : [mon:08:31,mon:17:20) +//] + diff --git a/src/boost/libs/icl/example/static_interval_/vc10_static_interval.vcxproj b/src/boost/libs/icl/example/static_interval_/vc10_static_interval.vcxproj new file mode 100644 index 00000000..978ca07e --- /dev/null +++ b/src/boost/libs/icl/example/static_interval_/vc10_static_interval.vcxproj @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{EE61B7EF-EC45-4165-8B59-FD5B7D4A9F7C}</ProjectGuid> + <RootNamespace>Static_interval</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="static_interval.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\static_interval.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/static_interval_/vc10_static_interval.vcxproj.filters b/src/boost/libs/icl/example/static_interval_/vc10_static_interval.vcxproj.filters new file mode 100644 index 00000000..ccc7c12c --- /dev/null +++ b/src/boost/libs/icl/example/static_interval_/vc10_static_interval.vcxproj.filters @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="static_interval.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\static_interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/static_interval_/vc9_static_interval.vcproj b/src/boost/libs/icl/example/static_interval_/vc9_static_interval.vcproj new file mode 100644 index 00000000..2607941d --- /dev/null +++ b/src/boost/libs/icl/example/static_interval_/vc9_static_interval.vcproj @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_static_interval" + ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}" + RootNamespace="Static_interval" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\static_interval.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\static_interval.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/std_copy_/std_copy.cpp b/src/boost/libs/icl/example/std_copy_/std_copy.cpp new file mode 100644 index 00000000..94612501 --- /dev/null +++ b/src/boost/libs/icl/example/std_copy_/std_copy.cpp @@ -0,0 +1,105 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example std_copy.cpp \file std_copy.cpp + \brief Fill interval containers using std::copy. + + Example std_copy shows how algorithm std::copy can be used to + fill interval containers from other std::containers and how copying + to interval containers differs from other uses of std::copy. + + \include std_copy_/std_copy.cpp +*/ +//[example_std_copy +#include <iostream> +#include <vector> +#include <algorithm> +#include <boost/icl/interval_map.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +// 'make_segments' returns a vector of interval value pairs, which +// are not sorted. The values are taken from the minimal example +// in section 'interval combining styles'. +vector<pair<discrete_interval<int>, int> > make_segments() +{ + vector<pair<discrete_interval<int>, int> > segment_vec; + segment_vec.push_back(make_pair(discrete_interval<int>::right_open(2,4), 1)); + segment_vec.push_back(make_pair(discrete_interval<int>::right_open(4,5), 1)); + segment_vec.push_back(make_pair(discrete_interval<int>::right_open(1,3), 1)); + return segment_vec; +} + +// 'show_segments' displays the source segements. +void show_segments(const vector<pair<discrete_interval<int>, int> >& segments) +{ + vector<pair<discrete_interval<int>, int> >::const_iterator iter = segments.begin(); + while(iter != segments.end()) + { + cout << "(" << iter->first << "," << iter->second << ")"; + ++iter; + } +} + +void std_copy() +{ + // So we have some segments stored in an std container. + vector<pair<discrete_interval<int>, int> > segments = make_segments(); + // Display the input + cout << "input sequence: "; show_segments(segments); cout << "\n\n"; + + // We are going to 'std::copy' those segments into an interval_map: + interval_map<int,int> segmap; + + // Use an 'icl::inserter' from <boost/icl/iterator.hpp> to call + // insertion on the interval container. + std::copy(segments.begin(), segments.end(), + icl::inserter(segmap, segmap.end())); + cout << "icl::inserting: " << segmap << endl; + segmap.clear(); + + // When we are feeding data into interval_maps, most of the time we are + // intending to compute an aggregation result. So we are not interested + // the std::insert semantincs but the aggregating icl::addition semantics. + // To achieve this there is an icl::add_iterator and an icl::adder function + // provided in <boost/icl/iterator.hpp>. + std::copy(segments.begin(), segments.end(), + icl::adder(segmap, segmap.end())); //Aggregating associated values + cout << "icl::adding : " << segmap << endl; + + // In this last case, the semantics of 'std::copy' transforms to the + // generalized addition operation, that is implemented by operator + // += or + on itl maps and sets. +} + +int main() +{ + cout << ">> Interval Container Library: Example std_copy.cpp <<\n"; + cout << "-----------------------------------------------------------\n"; + cout << "Using std::copy to fill an interval_map:\n\n"; + + std_copy(); + return 0; +} + +// Program output: +/*--------------------------------------------------------- +>> Interval Container Library: Example std_copy.cpp << +----------------------------------------------------------- +Using std::copy to fill an interval_map: + +input sequence: ([2,4),1)([4,5),1)([1,3),1) + +icl::inserting: {([1,5)->1)} +icl::adding : {([1,2)->1)([2,3)->2)([3,5)->1)} +---------------------------------------------------------*/ +//] diff --git a/src/boost/libs/icl/example/std_copy_/vc10_std_copy.vcxproj b/src/boost/libs/icl/example/std_copy_/vc10_std_copy.vcxproj new file mode 100644 index 00000000..41cb9d36 --- /dev/null +++ b/src/boost/libs/icl/example/std_copy_/vc10_std_copy.vcxproj @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-D75FD6990B84}</ProjectGuid> + <RootNamespace>std_copy</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="std_copy.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/std_copy_/vc10_std_copy.vcxproj.filters b/src/boost/libs/icl/example/std_copy_/vc10_std_copy.vcxproj.filters new file mode 100644 index 00000000..783e0eda --- /dev/null +++ b/src/boost/libs/icl/example/std_copy_/vc10_std_copy.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="std_copy.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/std_copy_/vc9_std_copy.vcproj b/src/boost/libs/icl/example/std_copy_/vc9_std_copy.vcproj new file mode 100644 index 00000000..71318417 --- /dev/null +++ b/src/boost/libs/icl/example/std_copy_/vc9_std_copy.vcproj @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_std_copy" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-D75FD6990B84}" + RootNamespace="std_copy" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\std_copy.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/std_transform_/std_transform.cpp b/src/boost/libs/icl/example/std_transform_/std_transform.cpp new file mode 100644 index 00000000..dcc16e2f --- /dev/null +++ b/src/boost/libs/icl/example/std_transform_/std_transform.cpp @@ -0,0 +1,149 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example std_transform.cpp \file std_transform.cpp + \brief Fill interval containers from user defined objects using std::transform. + + Example std_transform shows how algorithm std::transform can be used to + fill interval containers from std::containers of objects of a user + defined class. + + \include std_transform_/std_transform.cpp +*/ +//[example_std_transform +#include <iostream> +#include <vector> +#include <algorithm> +#include <boost/icl/split_interval_map.hpp> +#include <boost/icl/separate_interval_set.hpp> + +using namespace std; +using namespace boost; +using namespace boost::icl; + +// Suppose we are working with a class called MyObject, containing some +// information about interval bounds e.g. _from, _to and some data members +// that carry associated information like e.g. _value. +class MyObject +{ +public: + MyObject(){} + MyObject(int from, int to, int value): _from(from), _to(to), _value(value){} + int from()const {return _from;} + int to()const {return _to;} + int value()const{return _value;} +private: + int _from; + int _to; + int _value; +}; + +// ... in order to use the std::transform algorithm to fill +// interval maps with MyObject data we need a function +// 'to_segment' that maps an object of type MyObject into +// the value type to the interval map we want to tranform to ... +pair<discrete_interval<int>, int> to_segment(const MyObject& myObj) +{ + return std::pair< discrete_interval<int>, int > + (discrete_interval<int>::closed(myObj.from(), myObj.to()), myObj.value()); +} + +// ... there may be another function that returns the interval +// of an object only +discrete_interval<int> to_interval(const MyObject& myObj) +{ + return discrete_interval<int>::closed(myObj.from(), myObj.to()); +} + + +// ... make_object computes a sequence of objects to test. +vector<MyObject> make_objects() +{ + vector<MyObject> object_vec; + object_vec.push_back(MyObject(2,3,1)); + object_vec.push_back(MyObject(4,4,1)); + object_vec.push_back(MyObject(1,2,1)); + return object_vec; +} + +// ... show_objects displays the sequence of input objects. +void show_objects(const vector<MyObject>& objects) +{ + vector<MyObject>::const_iterator iter = objects.begin(); + while(iter != objects.end()) + { + cout << "([" << iter->from() << "," << iter->to() << "]," + << iter->value() << ")"; + ++iter; + } +} + + +void std_transform() +{ + // This time we want to transform objects into a splitting interval map: + split_interval_map<int,int> segmap; + vector<MyObject> myObjects = make_objects(); + + // Display the input + cout << "input sequence: "; show_objects(myObjects); cout << "\n\n"; + + // Use an icl::inserter to fill the interval map via inserts + std::transform(myObjects.begin(), myObjects.end(), + icl::inserter(segmap, segmap.end()), + to_segment); + cout << "icl::inserting: " << segmap << endl; + segmap.clear(); + + // In order to compute aggregation results on associated values, we + // usually want to use an icl::adder instead of an std or icl::inserter + std::transform(myObjects.begin(), myObjects.end(), + icl::adder(segmap, segmap.end()), + to_segment); + cout << "icl::adding : " << segmap << "\n\n"; + + separate_interval_set<int> segset; + std::transform(myObjects.begin(), myObjects.end(), + icl::adder (segset, segset.end()), + // could be a icl::inserter(segset, segset.end()), here: same effect + to_interval); + + cout << "Using std::transform to fill a separate_interval_set:\n\n"; + cout << "icl::adding : " << segset << "\n\n"; +} + + +int main() +{ + cout << ">> Interval Container Library: Example std_transform.cpp <<\n"; + cout << "------------------------------------------------------------\n"; + cout << "Using std::transform to fill a split_interval_map:\n\n"; + + std_transform(); + return 0; +} + +// Program output: +/*---------------------------------------------------------- +>> Interval Container Library: Example std_transform.cpp << +------------------------------------------------------------ +Using std::transform to fill a split_interval_map: + +input sequence: ([2,3],1)([4,4],1)([1,2],1) + +icl::inserting: {([1,2)->1)([2,3]->1)([4,4]->1)} +icl::adding : {([1,2)->1)([2,2]->2)((2,3]->1)([4,4]->1)} + +Using std::transform to fill a separate_interval_set: + +icl::adding : {[1,3][4,4]} +----------------------------------------------------------*/ +//] + diff --git a/src/boost/libs/icl/example/std_transform_/vc10_std_transform.vcxproj b/src/boost/libs/icl/example/std_transform_/vc10_std_transform.vcxproj new file mode 100644 index 00000000..a80aac29 --- /dev/null +++ b/src/boost/libs/icl/example/std_transform_/vc10_std_transform.vcxproj @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-D75FD6990B85}</ProjectGuid> + <RootNamespace>std_transform</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="std_transform.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\separate_interval_set.hpp" /> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_map.hpp" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/std_transform_/vc10_std_transform.vcxproj.filters b/src/boost/libs/icl/example/std_transform_/vc10_std_transform.vcxproj.filters new file mode 100644 index 00000000..0aebee16 --- /dev/null +++ b/src/boost/libs/icl/example/std_transform_/vc10_std_transform.vcxproj.filters @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="std_transform.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\separate_interval_set.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\..\..\..\boost\itl\split_interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/std_transform_/vc9_std_transform.vcproj b/src/boost/libs/icl/example/std_transform_/vc9_std_transform.vcproj new file mode 100644 index 00000000..6bf81973 --- /dev/null +++ b/src/boost/libs/icl/example/std_transform_/vc9_std_transform.vcproj @@ -0,0 +1,218 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_std_transform" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-D75FD6990B85}" + RootNamespace="std_transform" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\std_transform.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\separate_interval_set.hpp" + > + </File> + <File + RelativePath="..\..\..\..\boost\itl\split_interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/toytime.hpp b/src/boost/libs/icl/example/toytime.hpp new file mode 100644 index 00000000..30062878 --- /dev/null +++ b/src/boost/libs/icl/example/toytime.hpp @@ -0,0 +1,74 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#include <boost/config.hpp> +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4996) // This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. +#endif + +namespace boost{namespace icl +{ + +/** Time is a toy-class to demonstrate a class that conforms the requirements of + a template parameter for class template icl::interval. + + In real world applications you may want to use the integer representation of a + time variable. That way intervals and their containers are working most efficiently. +*/ + +enum {sunday=0, monday, tuesday, wednesday, thursday, friday, saturday}; +static const char* daynames[] = {"sun", "mon", "tue", "wed", "thu", "fri", "sat"}; + +class Time +{ +public: + Time(): m_time(0) {} + Time(int hours, int minutes): m_time(60*hours+minutes) {} + Time(int day, int hours, int minutes): m_time((24*60)*day+60*hours+minutes) {} + int getDay()const { return m_time/(24*60); } + int getHours()const { return (m_time%(24*60))/60; } + int getMinutes()const { return (m_time%(24*60))%60; } + int asInt()const { return m_time; } + std::string getDayString()const { return daynames[getDay()]; } + + std::string as_string()const + { + const int MAX_TIMESTING_LEN = 256; + char repr[MAX_TIMESTING_LEN]; + sprintf(repr, "%3s:%02d:%02d", getDayString().c_str(), getHours(), getMinutes()); + return std::string(repr); + } + + Time& operator ++ () { m_time++; return *this; } + Time& operator -- () { m_time--; return *this; } + +private: + int m_time; +}; + + +bool operator < (const Time& x1, const Time& x2) { return x1.asInt() < x2.asInt(); } +bool operator == (const Time& x1, const Time& x2) { return x1.asInt() == x2.asInt(); } +bool operator <= (const Time& x1, const Time& x2) { return x1.asInt() <= x2.asInt(); } + + +template<class CharType, class CharTraits> +std::basic_ostream<CharType, CharTraits> &operator<< + (std::basic_ostream<CharType, CharTraits> &stream, Time const& value) +{ + return stream << value.as_string(); +} + +}} // namespace icl boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + diff --git a/src/boost/libs/icl/example/user_groups_/user_groups.cpp b/src/boost/libs/icl/example/user_groups_/user_groups.cpp new file mode 100644 index 00000000..a04be519 --- /dev/null +++ b/src/boost/libs/icl/example/user_groups_/user_groups.cpp @@ -0,0 +1,197 @@ +/*-----------------------------------------------------------------------------+ +Interval Container Library +Author: Joachim Faulhaber +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/** Example user_groups.cpp \file user_groups.cpp + \brief Shows the availability of set operations on interval maps. + + In the example there is a user group 'med_users' of a hosptial staff + that has the authorisation to handle medical data of patients. + User group 'admin_users' has access to administrative data like + health insurance and invoice data. + + The membership for each user in one of the user groups has a time + interval of validity. The group membership begins and ends. + + Using a union operation '+' we can have an overview over both + user groups and the membership dates of employees. + + Computing an intersection '&' shows the super users. The persons + that are members of both med_users and admin_users and the times + of the joint memberships. + + \include user_groups_/user_groups.cpp +*/ +//[example_user_groups +// The next line includes <boost/gregorian/date.hpp> +// and a few lines of adapter code. +#include <boost/icl/gregorian.hpp> +#include <iostream> +#include <boost/icl/interval_map.hpp> + +using namespace std; +using namespace boost::gregorian; +using namespace boost::icl; + +// Type icl::set<string> collects the names a user group's members. Therefore +// it needs to implement operator += that performs a set union on overlap of +// intervals. +typedef std::set<string> MemberSetT; + +// boost::gregorian::date is the domain type the interval map. +// It's key values are therefore time intervals: discrete_interval<date>. The content +// is the set of names: MemberSetT. +typedef interval_map<date, MemberSetT> MembershipT; + +// Collect user groups for medical and administrative staff and perform +// union and intersection operations on the collected membership schedules. +void user_groups() +{ + MemberSetT mary_harry; + mary_harry.insert("Mary"); + mary_harry.insert("Harry"); + + MemberSetT diana_susan; + diana_susan.insert("Diana"); + diana_susan.insert("Susan"); + + MemberSetT chief_physician; + chief_physician.insert("Dr.Jekyll"); + + MemberSetT director_of_admin; + director_of_admin.insert("Mr.Hyde"); + + //----- Collecting members of user group: med_users ------------------- + MembershipT med_users; + + med_users.add( // add and element + make_pair( + discrete_interval<date>::closed( + from_string("2008-01-01"), from_string("2008-12-31")), mary_harry)); + + med_users += // element addition can also be done via operator += + make_pair( + discrete_interval<date>::closed( + from_string("2008-01-15"), from_string("2008-12-31")), + chief_physician); + + med_users += + make_pair( + discrete_interval<date>::closed( + from_string("2008-02-01"), from_string("2008-10-15")), + director_of_admin); + + //----- Collecting members of user group: admin_users ------------------ + MembershipT admin_users; + + admin_users += // element addition can also be done via operator += + make_pair( + discrete_interval<date>::closed( + from_string("2008-03-20"), from_string("2008-09-30")), diana_susan); + + admin_users += + make_pair( + discrete_interval<date>::closed( + from_string("2008-01-15"), from_string("2008-12-31")), + chief_physician); + + admin_users += + make_pair( + discrete_interval<date>::closed( + from_string("2008-02-01"), from_string("2008-10-15")), + director_of_admin); + + MembershipT all_users = med_users + admin_users; + + MembershipT super_users = med_users & admin_users; + + MembershipT::iterator med_ = med_users.begin(); + cout << "----- Membership of medical staff -----------------------------------\n"; + while(med_ != med_users.end()) + { + discrete_interval<date> when = (*med_).first; + // Who is member of group med_users within the time interval 'when' ? + MemberSetT who = (*med_++).second; + cout << "[" << first(when) << " - " << last(when) << "]" + << ": " << who << endl; + } + + MembershipT::iterator admin_ = admin_users.begin(); + cout << "----- Membership of admin staff -------------------------------------\n"; + while(admin_ != admin_users.end()) + { + discrete_interval<date> when = (*admin_).first; + // Who is member of group admin_users within the time interval 'when' ? + MemberSetT who = (*admin_++).second; + cout << "[" << first(when) << " - " << last(when) << "]" + << ": " << who << endl; + } + + MembershipT::iterator all_ = all_users.begin(); + cout << "----- Membership of all users (med + admin) -------------------------\n"; + while(all_ != all_users.end()) + { + discrete_interval<date> when = (*all_).first; + // Who is member of group med_users OR admin_users ? + MemberSetT who = (*all_++).second; + cout << "[" << first(when) << " - " << last(when) << "]" + << ": " << who << endl; + } + + MembershipT::iterator super_ = super_users.begin(); + cout << "----- Membership of super users: intersection(med,admin) ------------\n"; + while(super_ != super_users.end()) + { + discrete_interval<date> when = (*super_).first; + // Who is member of group med_users AND admin_users ? + MemberSetT who = (*super_++).second; + cout << "[" << first(when) << " - " << last(when) << "]" + << ": " << who << endl; + } + +} + + +int main() +{ + cout << ">>Interval Container Library: Sample user_groups.cpp <<\n"; + cout << "-------------------------------------------------------\n"; + user_groups(); + return 0; +} + +// Program output: +/*----------------------------------------------------------------------------- +>>Interval Container Library: Sample user_groups.cpp << +------------------------------------------------------- +----- Membership of medical staff ----------------------------------- +[2008-Jan-01 - 2008-Jan-14]: Harry Mary +[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll Harry Mary +[2008-Feb-01 - 2008-Oct-15]: Dr.Jekyll Harry Mary Mr.Hyde +[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll Harry Mary +----- Membership of admin staff ------------------------------------- +[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll +[2008-Feb-01 - 2008-Mar-19]: Dr.Jekyll Mr.Hyde +[2008-Mar-20 - 2008-Sep-30]: Diana Dr.Jekyll Mr.Hyde Susan +[2008-Oct-01 - 2008-Oct-15]: Dr.Jekyll Mr.Hyde +[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll +----- Membership of all users (med + admin) ------------------------- +[2008-Jan-01 - 2008-Jan-14]: Harry Mary +[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll Harry Mary +[2008-Feb-01 - 2008-Mar-19]: Dr.Jekyll Harry Mary Mr.Hyde +[2008-Mar-20 - 2008-Sep-30]: Diana Dr.Jekyll Harry Mary Mr.Hyde Susan +[2008-Oct-01 - 2008-Oct-15]: Dr.Jekyll Harry Mary Mr.Hyde +[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll Harry Mary +----- Membership of super users: intersection(med,admin) ------------ +[2008-Jan-15 - 2008-Jan-31]: Dr.Jekyll +[2008-Feb-01 - 2008-Oct-15]: Dr.Jekyll Mr.Hyde +[2008-Oct-16 - 2008-Dec-31]: Dr.Jekyll +-----------------------------------------------------------------------------*/ +//] + diff --git a/src/boost/libs/icl/example/user_groups_/vc10_user_groups.vcxproj b/src/boost/libs/icl/example/user_groups_/vc10_user_groups.vcxproj new file mode 100644 index 00000000..29b10228 --- /dev/null +++ b/src/boost/libs/icl/example/user_groups_/vc10_user_groups.vcxproj @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{DD9C9854-3882-42B9-BFA2-DC88DD5BF4A1}</ProjectGuid> + <RootNamespace>User_groups</RootNamespace> + <Keyword>Win32Proj</Keyword> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + <WholeProgramOptimization>true</WholeProgramOptimization> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MinimalRebuild>true</MinimalRebuild> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <SubSystem>Console</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + </ClCompile> + <Link> + <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> + <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Console</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <TargetMachine>MachineX86</TargetMachine> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="user_groups.cpp" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp" /> + </ItemGroup> + <ItemGroup> + <None Include="ReadMe.txt" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/user_groups_/vc10_user_groups.vcxproj.filters b/src/boost/libs/icl/example/user_groups_/vc10_user_groups.vcxproj.filters new file mode 100644 index 00000000..aad092bf --- /dev/null +++ b/src/boost/libs/icl/example/user_groups_/vc10_user_groups.vcxproj.filters @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="user_groups.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\..\..\..\boost\itl\interval_map.hpp"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> + <ItemGroup> + <None Include="ReadMe.txt" /> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/src/boost/libs/icl/example/user_groups_/vc9_user_groups.vcproj b/src/boost/libs/icl/example/user_groups_/vc9_user_groups.vcproj new file mode 100644 index 00000000..6934088b --- /dev/null +++ b/src/boost/libs/icl/example/user_groups_/vc9_user_groups.vcproj @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="vc9_user_groups" + ProjectGUID="{DD9C9854-3882-42B9-BFA1-DC88DD5BF4A1}" + RootNamespace="User_groups" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="../../../../bin/debug/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/" + 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="../../../../" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="true" + OutputFile="../../../../bin/debug/$(ProjectName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + AssemblyDebug="1" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + UseUnicodeResponseFiles="true" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="../../../../bin/release/" + IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/" + 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="../../../../" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="4" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + UseUnicodeResponseFiles="false" + OutputFile="../../../../bin/release/$(ProjectName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib" + IgnoreAllDefaultLibraries="false" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <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=".\user_groups.cpp" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\boost\itl\interval_map.hpp" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + <File + RelativePath=".\ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/src/boost/libs/icl/example/vc10_icl_examples.sln b/src/boost/libs/icl/example/vc10_icl_examples.sln new file mode 100644 index 00000000..6da2c8ca --- /dev/null +++ b/src/boost/libs/icl/example/vc10_icl_examples.sln @@ -0,0 +1,110 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_boost_party", "boost_party_\vc10_boost_party.vcxproj", "{DD9C9854-3882-42B9-BFA2-1907CC6613F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_custom_interval", "custom_interval_\vc10_custom_interval.vcxproj", "{DD9C9854-3882-42B9-BFA2-1907CC6614F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_dynamic_interval", "dynamic_interval_\vc10_dynamic_interval.vcxproj", "{EE61B7EF-EC45-4165-8B59-FD5B7D3A9F7C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_interval", "interval_\vc10_interval.vcxproj", "{EE61B7EF-EC45-4165-8B59-FD5B7D2A9F7C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_interval_container", "interval_container_\vc10_interval_container.vcxproj", "{DD9C9854-3882-42B9-BFA2-E91A07F9DD81}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_large_bitset", "large_bitset_\vc10_large_bitset.vcxproj", "{DD9C9854-3882-42B9-BFA2-AA054DD53759}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_man_power", "man_power_\vc10_man_power.vcxproj", "{DD9C9854-3882-42B9-BFA2-04ED0F38E8C2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_month_and_week_grid", "month_and_week_grid_\vc10_month_and_week_grid.vcxproj", "{DD9C9854-3882-42B9-BFA2-CDC290478F78}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_overlap_counter", "overlap_counter_\vc10_overlap_counter.vcxproj", "{DD9C9854-3882-42B9-BFA2-D75FD6990B83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_party", "party_\vc10_party.vcxproj", "{DD9C9854-3882-42B9-BFA2-AA054DD43759}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_partys_height_average", "partys_height_average_\vc10_partys_height_average.vcxproj", "{DD9C9854-3882-42B9-BFA2-1907CC6633F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_partys_tallest_guests", "partys_tallest_guests_\vc10_partys_tallest_guests.vcxproj", "{DD9C9854-3882-42B9-BFA2-1907CC6623F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_static_interval", "static_interval_\vc10_static_interval.vcxproj", "{EE61B7EF-EC45-4165-8B59-FD5B7D4A9F7C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_std_copy", "std_copy_\vc10_std_copy.vcxproj", "{DD9C9854-3882-42B9-BFA2-D75FD6990B84}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_std_transform", "std_transform_\vc10_std_transform.vcxproj", "{DD9C9854-3882-42B9-BFA2-D75FD6990B85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc10_user_groups", "user_groups_\vc10_user_groups.vcxproj", "{DD9C9854-3882-42B9-BFA2-DC88DD5BF4A1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DD9C9854-3882-42B9-BFA2-1907CC6613F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6613F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6613F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6613F8}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6614F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6614F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6614F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6614F8}.Release|Win32.Build.0 = Release|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D3A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D3A9F7C}.Debug|Win32.Build.0 = Debug|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D3A9F7C}.Release|Win32.ActiveCfg = Release|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D3A9F7C}.Release|Win32.Build.0 = Release|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D2A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D2A9F7C}.Debug|Win32.Build.0 = Debug|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D2A9F7C}.Release|Win32.ActiveCfg = Release|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D2A9F7C}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-E91A07F9DD81}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-E91A07F9DD81}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-E91A07F9DD81}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-E91A07F9DD81}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD53759}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD53759}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD53759}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD53759}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-04ED0F38E8C2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-04ED0F38E8C2}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-04ED0F38E8C2}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-04ED0F38E8C2}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-CDC290478F78}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-CDC290478F78}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-CDC290478F78}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-CDC290478F78}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B83}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B83}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B83}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B83}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD43759}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD43759}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD43759}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-AA054DD43759}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6633F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6633F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6633F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6633F8}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6623F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6623F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6623F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-1907CC6623F8}.Release|Win32.Build.0 = Release|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D4A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D4A9F7C}.Debug|Win32.Build.0 = Debug|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D4A9F7C}.Release|Win32.ActiveCfg = Release|Win32 + {EE61B7EF-EC45-4165-8B59-FD5B7D4A9F7C}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B84}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B84}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B84}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B84}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B85}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B85}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B85}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-D75FD6990B85}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA2-DC88DD5BF4A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-DC88DD5BF4A1}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA2-DC88DD5BF4A1}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA2-DC88DD5BF4A1}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/boost/libs/icl/example/vc9_icl_examples.sln b/src/boost/libs/icl/example/vc9_icl_examples.sln new file mode 100644 index 00000000..1a82520b --- /dev/null +++ b/src/boost/libs/icl/example/vc9_icl_examples.sln @@ -0,0 +1,110 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_std_copy", "std_copy_\vc9_std_copy.vcproj", "{DD9C9854-3882-42B9-BFA1-D75FD6990B84}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_std_transform", "std_transform_\vc9_std_transform.vcproj", "{DD9C9854-3882-42B9-BFA1-D75FD6990B85}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_large_bitset", "large_bitset_\vc9_large_bitset.vcproj", "{DD9C9854-3882-42B9-BFA1-AA054DD53759}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_interval", "interval_\vc9_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boost_party", "boost_party_\vc9_boost_party.vcproj", "{DD9C9854-3882-42B9-BFA1-1907CC6613F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_interval_container", "interval_container_\vc9_interval_container.vcproj", "{DD9C9854-3882-42B9-BFA1-E91A07F9DD81}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_man_power", "man_power_\vc9_man_power.vcproj", "{DD9C9854-3882-42B9-BFA1-04ED0F38E8C2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_month_and_week_grid", "month_and_week_grid_\vc9_month_and_week_grid.vcproj", "{DD9C9854-3882-42B9-BFA1-CDC290478F78}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_overlap_counter", "overlap_counter_\vc9_overlap_counter.vcproj", "{DD9C9854-3882-42B9-BFA1-D75FD6990B83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_party", "party_\vc9_party.vcproj", "{DD9C9854-3882-42B9-BFA1-AA054DD43759}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_partys_height_average", "partys_height_average_\vc9_partys_height_average.vcproj", "{DD9C9854-3882-42B9-BFA1-1907CC6633F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_partys_tallest_guests", "partys_tallest_guests_\vc9_partys_tallest_guests.vcproj", "{DD9C9854-3882-42B9-BFA1-1907CC6623F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_user_groups", "user_groups_\vc9_user_groups.vcproj", "{DD9C9854-3882-42B9-BFA1-DC88DD5BF4A1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_custom_interval", "custom_interval_\vc9_custom_interval.vcproj", "{DD9C9854-3882-42B9-BFA1-1907CC6614F8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_dynamic_interval", "dynamic_interval_\vc9_dynamic_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_static_interval", "static_interval_\vc9_static_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DD9C9854-3882-42B9-BFA1-D75FD6990B84}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B84}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B84}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B84}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B85}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B85}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B85}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B85}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD53759}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD53759}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD53759}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD53759}.Release|Win32.Build.0 = Release|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Debug|Win32.Build.0 = Debug|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Release|Win32.ActiveCfg = Release|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F7C}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6613F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6613F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6613F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6613F8}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-E91A07F9DD81}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-E91A07F9DD81}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-E91A07F9DD81}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-E91A07F9DD81}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-04ED0F38E8C2}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-04ED0F38E8C2}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-04ED0F38E8C2}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-04ED0F38E8C2}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-CDC290478F78}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-CDC290478F78}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-CDC290478F78}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-CDC290478F78}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B83}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B83}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B83}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-D75FD6990B83}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD43759}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD43759}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD43759}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-AA054DD43759}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6633F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6633F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6633F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6633F8}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6623F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6623F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6623F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6623F8}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-DC88DD5BF4A1}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-DC88DD5BF4A1}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-DC88DD5BF4A1}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-DC88DD5BF4A1}.Release|Win32.Build.0 = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6614F8}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6614F8}.Debug|Win32.Build.0 = Debug|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6614F8}.Release|Win32.ActiveCfg = Release|Win32 + {DD9C9854-3882-42B9-BFA1-1907CC6614F8}.Release|Win32.Build.0 = Release|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Debug|Win32.Build.0 = Debug|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Release|Win32.ActiveCfg = Release|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D3A9F7C}.Release|Win32.Build.0 = Release|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Debug|Win32.Build.0 = Debug|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Release|Win32.ActiveCfg = Release|Win32 + {EE61B7EF-EC45-4165-8B49-FD5B7D4A9F7C}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal |