Skip to content

Commit a73e63b

Browse files
Владимир СеверовВладимир Северов
authored andcommitted
17.04.11 01:15 - Release
1 parent 5f9704c commit a73e63b

File tree

5 files changed

+827
-0
lines changed

5 files changed

+827
-0
lines changed

HW-1/HW-1.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HW-1", "HW-1\HW-1.vcxproj", "{027478B2-40EF-4313-B8EE-FCE1493052BF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Debug|x64.ActiveCfg = Debug|x64
17+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Debug|x64.Build.0 = Debug|x64
18+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Debug|x86.ActiveCfg = Debug|Win32
19+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Debug|x86.Build.0 = Debug|Win32
20+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Release|x64.ActiveCfg = Release|x64
21+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Release|x64.Build.0 = Release|x64
22+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Release|x86.ActiveCfg = Release|Win32
23+
{027478B2-40EF-4313-B8EE-FCE1493052BF}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

HW-1/HW-1/HW-1.vcxproj

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{027478B2-40EF-4313-B8EE-FCE1493052BF}</ProjectGuid>
23+
<RootNamespace>HW1</RootNamespace>
24+
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
25+
</PropertyGroup>
26+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
28+
<ConfigurationType>Application</ConfigurationType>
29+
<UseDebugLibraries>true</UseDebugLibraries>
30+
<PlatformToolset>v140</PlatformToolset>
31+
<CharacterSet>MultiByte</CharacterSet>
32+
</PropertyGroup>
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
34+
<ConfigurationType>Application</ConfigurationType>
35+
<UseDebugLibraries>false</UseDebugLibraries>
36+
<PlatformToolset>v140</PlatformToolset>
37+
<WholeProgramOptimization>true</WholeProgramOptimization>
38+
<CharacterSet>MultiByte</CharacterSet>
39+
</PropertyGroup>
40+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
41+
<ConfigurationType>Application</ConfigurationType>
42+
<UseDebugLibraries>true</UseDebugLibraries>
43+
<PlatformToolset>v140</PlatformToolset>
44+
<CharacterSet>MultiByte</CharacterSet>
45+
</PropertyGroup>
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
47+
<ConfigurationType>Application</ConfigurationType>
48+
<UseDebugLibraries>false</UseDebugLibraries>
49+
<PlatformToolset>v140</PlatformToolset>
50+
<WholeProgramOptimization>true</WholeProgramOptimization>
51+
<CharacterSet>MultiByte</CharacterSet>
52+
</PropertyGroup>
53+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
54+
<ImportGroup Label="ExtensionSettings">
55+
</ImportGroup>
56+
<ImportGroup Label="Shared">
57+
</ImportGroup>
58+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
59+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
60+
</ImportGroup>
61+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
62+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
68+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69+
</ImportGroup>
70+
<PropertyGroup Label="UserMacros" />
71+
<PropertyGroup />
72+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
73+
<ClCompile>
74+
<WarningLevel>Level3</WarningLevel>
75+
<Optimization>Disabled</Optimization>
76+
<SDLCheck>true</SDLCheck>
77+
</ClCompile>
78+
</ItemDefinitionGroup>
79+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
80+
<ClCompile>
81+
<WarningLevel>Level3</WarningLevel>
82+
<Optimization>Disabled</Optimization>
83+
<SDLCheck>true</SDLCheck>
84+
</ClCompile>
85+
</ItemDefinitionGroup>
86+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
87+
<ClCompile>
88+
<WarningLevel>Level3</WarningLevel>
89+
<Optimization>MaxSpeed</Optimization>
90+
<FunctionLevelLinking>true</FunctionLevelLinking>
91+
<IntrinsicFunctions>true</IntrinsicFunctions>
92+
<SDLCheck>true</SDLCheck>
93+
</ClCompile>
94+
<Link>
95+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
96+
<OptimizeReferences>true</OptimizeReferences>
97+
</Link>
98+
</ItemDefinitionGroup>
99+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
100+
<ClCompile>
101+
<WarningLevel>Level3</WarningLevel>
102+
<Optimization>MaxSpeed</Optimization>
103+
<FunctionLevelLinking>true</FunctionLevelLinking>
104+
<IntrinsicFunctions>true</IntrinsicFunctions>
105+
<SDLCheck>true</SDLCheck>
106+
</ClCompile>
107+
<Link>
108+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
109+
<OptimizeReferences>true</OptimizeReferences>
110+
</Link>
111+
</ItemDefinitionGroup>
112+
<ItemGroup>
113+
<ClCompile Include="Source.cpp" />
114+
</ItemGroup>
115+
<ItemGroup>
116+
<ClInclude Include="UnorderedSet.h" />
117+
</ItemGroup>
118+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
119+
<ImportGroup Label="ExtensionTargets">
120+
</ImportGroup>
121+
</Project>

HW-1/HW-1/HW-1.vcxproj.filters

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="Source.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClInclude Include="UnorderedSet.h">
24+
<Filter>Header Files</Filter>
25+
</ClInclude>
26+
</ItemGroup>
27+
</Project>

HW-1/HW-1/Source.cpp

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#include <iostream>
2+
#include <unordered_set>
3+
#include "UnorderedSet.h"
4+
5+
void hasher() {
6+
7+
}
8+
9+
int main()
10+
{
11+
std::unordered_set<int> test;
12+
test.max_load_factor(2);
13+
for (int i = 0; i < 10; i++) {
14+
test.insert(i);
15+
std::cout << test.size() << " " << test.bucket_count() << " " << test.load_factor() << ": ";
16+
for (size_t j = 0; j < test.bucket_count(); j++) {
17+
std::cout << test.bucket_size(j) << " ";
18+
}
19+
std::cout << std::endl;
20+
}
21+
test.max_load_factor(1);
22+
test.insert(11);
23+
std::cout << test.size() << " " << test.bucket_count() << " " << test.load_factor() << ": ";
24+
for (size_t j = 0; j < test.bucket_count(); j++) {
25+
std::cout << test.bucket_size(j) << " ";
26+
}
27+
std::cout << std::endl << std::endl;
28+
29+
UnorderedSet<int> test_2;
30+
test_2.MaxLoadFactor(2);
31+
for (int i = 0; i < 10; i++) {
32+
test_2.Insert(i);
33+
std::cout << test_2.Size() << " " << test_2.BucketCount() << " " << test_2.LoadFactor() << ": ";
34+
for (size_t j = 0; j < test_2.BucketCount(); j++) {
35+
std::cout << test_2.BucketSize(j) << " ";
36+
}
37+
std::cout << std::endl;
38+
}
39+
test_2.MaxLoadFactor(1);
40+
test_2.Insert(11);
41+
std::cout << test_2.Size() << " " << test_2.BucketCount() << " " << test_2.LoadFactor() << ": ";
42+
for (size_t j = 0; j < test_2.BucketCount(); j++) {
43+
std::cout << test_2.BucketSize(j) << " ";
44+
}
45+
std::cout << std::endl;
46+
47+
system("pause");
48+
return 0;
49+
}

0 commit comments

Comments
 (0)