Сравнить коммиты
51 Коммитов
ddd2854898
...
main
| Автор | SHA1 | Дата | |
|---|---|---|---|
| ef0fcfca11 | |||
| e32d622ada | |||
| ce1828c63b | |||
| 2a9b70a833 | |||
| 928e229a58 | |||
| c89c94151c | |||
| 663e485fdb | |||
| 4813bf8c13 | |||
| 09c75c3057 | |||
| 2e7cc7b34b | |||
| 2817ee274c | |||
| 0c00522f14 | |||
| 5867964daa | |||
| 90318f8151 | |||
| 83e2103ca7 | |||
| 2f22e192b3 | |||
| f021197658 | |||
| d16031c3f4 | |||
| 80f146ba36 | |||
| c250c10e38 | |||
| abf30f27d1 | |||
| d5f702afa3 | |||
| 07c73e5335 | |||
| 86617483be | |||
| 2416376b8b | |||
| 48636765b8 | |||
| c03705d9e6 | |||
| 4d5e66cf96 | |||
| d7fa671218 | |||
| c8c2cda678 | |||
| 16f27a864c | |||
| aa56012b5b | |||
| 3c6db36ee9 | |||
| 182dab56b7 | |||
| 88a65e8fdb | |||
| 37ffcf9839 | |||
| 61b9f1e79d | |||
| 2b8e3a306d | |||
| 3e399b7928 | |||
| 39c1218db4 | |||
| 02b855bc1e | |||
| 4b6282431e | |||
| 5dcd23cc52 | |||
| fefbb74768 | |||
| 6dda7b6e6a | |||
| fcc83d5dca | |||
| b3300dcec7 | |||
| be9b2d8ae4 | |||
| 58e8c30d67 | |||
| 0f36d27913 | |||
| 6bca2e79c8 |
1
.gitignore
поставляемый
1
.gitignore
поставляемый
@@ -1,5 +1,6 @@
|
|||||||
/bin/
|
/bin/
|
||||||
/obj/
|
/obj/
|
||||||
|
/curl/
|
||||||
*.rsuser
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
|||||||
7134
doctest.h
Обычный файл
7134
doctest.h
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
44
histogram.cpp
Обычный файл
44
histogram.cpp
Обычный файл
@@ -0,0 +1,44 @@
|
|||||||
|
#include "histogram.h"
|
||||||
|
#include "histogram_internal.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
bool find_minmax(const vector<double>& numbers, double& min, double& max) {
|
||||||
|
if (numbers.empty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
min = numbers[0];
|
||||||
|
max = numbers[0];
|
||||||
|
for (double x : numbers) {
|
||||||
|
if (x < min)
|
||||||
|
min = x;
|
||||||
|
if (x > max)
|
||||||
|
max = x;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
vector<size_t> make_histogram(const vector<double>& numbers, size_t bin_count) {
|
||||||
|
vector<size_t> bins(bin_count, 0);
|
||||||
|
double min, max;
|
||||||
|
find_minmax(numbers, min, max);
|
||||||
|
double bin_size = (max - min) / bin_count;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < numbers.size(); i++) {
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
|
for (size_t j = 0; j < bin_count - 1 && !found; j++) {
|
||||||
|
double lo = min + j * bin_size;
|
||||||
|
double hi = min + (j + 1) * bin_size;
|
||||||
|
if (numbers[i] >= lo && numbers[i] < hi) {
|
||||||
|
bins[j]++;
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found)
|
||||||
|
bins[bin_count - 1]++;
|
||||||
|
}
|
||||||
|
return bins;
|
||||||
|
}
|
||||||
4
histogram.h
Обычный файл
4
histogram.h
Обычный файл
@@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
std::vector<size_t> make_histogram(const std::vector<double>& numbers, size_t bin_count);
|
||||||
5
histogram_internal.h
Обычный файл
5
histogram_internal.h
Обычный файл
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
bool find_minmax(const std::vector<double>& numbers, double& min, double& max);
|
||||||
132
laba01upd3.cpp
132
laba01upd3.cpp
@@ -1,75 +1,75 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
#include "histogram.h"
|
||||||
|
#include "svg.h"
|
||||||
|
#include "text.h"
|
||||||
|
#include <curl/curl.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
const size_t SCREEN_WIDTH = 80;
|
struct Input {
|
||||||
const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1;
|
vector<double> numbers;
|
||||||
|
size_t bin_count{};
|
||||||
|
};
|
||||||
|
|
||||||
int main()
|
Input input_data(istream& in, bool prompt) {
|
||||||
{
|
if (prompt) cerr << "Enter number count: ";
|
||||||
size_t number_count;
|
size_t number_count;
|
||||||
cout << "Enter number count: ";
|
in >> number_count;
|
||||||
cin >> number_count;
|
Input data;
|
||||||
vector<double> numbers(number_count);
|
data.numbers.resize(number_count);
|
||||||
for (int i = 0; i < number_count; i++) {
|
if (prompt) cerr << "Enter " << number_count << " numbers: ";
|
||||||
cin >> numbers[i];
|
|
||||||
}
|
|
||||||
size_t bin_count; //количество интервалов на которые мы разбиваем
|
|
||||||
cout << "Enter bin count: ";
|
|
||||||
cin >> bin_count;
|
|
||||||
vector<size_t> bins(bin_count);
|
|
||||||
double min = numbers[0];
|
|
||||||
double max = numbers[0];
|
|
||||||
for (double x : numbers) {
|
|
||||||
if (x < min) {
|
|
||||||
min = x;
|
|
||||||
}
|
|
||||||
else if (x > max) {
|
|
||||||
max = x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
double bin_size = (max - min) / bin_count;
|
|
||||||
for (size_t i = 0; i < number_count; i++) {
|
for (size_t i = 0; i < number_count; i++) {
|
||||||
bool found = false;
|
in >> data.numbers[i];
|
||||||
for (size_t j = 0; (j < bin_count - 1) && !found; j++) {
|
|
||||||
auto lo = min + j * bin_size;
|
|
||||||
auto hi = min + (j + 1) * bin_size;
|
|
||||||
if ((lo <= numbers[i]) && (numbers[i] < hi)) {
|
|
||||||
bins[j]++;
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found) {
|
|
||||||
bins[bin_count - 1]++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
double max_count = bins[0];
|
|
||||||
for (double x : bins) {
|
|
||||||
if (x > max_count) {
|
|
||||||
max_count = x;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int j = 0; j < bin_count; j++) {
|
|
||||||
if (bins[j] < 100) {
|
|
||||||
cout << " ";
|
|
||||||
}
|
|
||||||
if (bins[j] < 10) {
|
|
||||||
cout << " ";
|
|
||||||
}
|
|
||||||
cout << bins[j] << "|";
|
|
||||||
|
|
||||||
size_t height;
|
|
||||||
if (max_count > MAX_ASTERISK) {
|
|
||||||
size_t count = bins[j];
|
|
||||||
height = 76 * (static_cast<double>(count) / max_count);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
height = bins[j];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = 0; i < height; i++) {
|
|
||||||
cout << "*";
|
|
||||||
}
|
|
||||||
cout << endl;
|
|
||||||
}
|
}
|
||||||
|
if (prompt) cerr << "Enter bin count: ";
|
||||||
|
in >> data.bin_count;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t write_data(void* items, size_t item_size, size_t item_count, void* ctx) {
|
||||||
|
size_t data_size = item_size * item_count;
|
||||||
|
auto* buffer = reinterpret_cast<stringstream*>(ctx);
|
||||||
|
buffer->write(reinterpret_cast<const char*>(items), data_size);
|
||||||
|
return data_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
Input download(const string& address) {
|
||||||
|
stringstream buffer;
|
||||||
|
CURL* curl = curl_easy_init();
|
||||||
|
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, address.c_str());
|
||||||
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer);
|
||||||
|
CURLcode res = curl_easy_perform(curl);
|
||||||
|
if (res != CURLE_OK) {
|
||||||
|
cerr << "curl_easy_perform() failed: " << curl_easy_strerror(res) << "\n";
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
double download_speed = 0.0;
|
||||||
|
curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &download_speed);
|
||||||
|
cerr << "Download speed: " << download_speed << " bytes/sec\n";
|
||||||
|
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
return input_data(buffer, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]) {
|
||||||
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
Input in;
|
||||||
|
if (argc > 1) {
|
||||||
|
in = download(argv[1]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
in = input_data(cin, true);
|
||||||
|
}
|
||||||
|
const auto bins = make_histogram(in.numbers, in.bin_count);
|
||||||
|
show_histogram_svg(bins);
|
||||||
|
show_histogram_text(bins);
|
||||||
|
curl_global_cleanup();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
169
laba01upd3.vcxproj
Обычный файл
169
laba01upd3.vcxproj
Обычный файл
@@ -0,0 +1,169 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" 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>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{7aea3de0-791a-40df-b555-ed559221baa2}</ProjectGuid>
|
||||||
|
<RootNamespace>laba01upd3</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>
|
||||||
|
</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>
|
||||||
|
</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>
|
||||||
|
</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>
|
||||||
|
</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>
|
||||||
|
</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>
|
||||||
|
</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\brega\OneDrive\Рабочий стол\lab03\laba01upd3\curl\include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>C:\Users\brega\OneDrive\Рабочий стол\lab03\laba01upd3\curl\lib</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>;libcurl.dll.a;libcurl.dll.a;libcrypto.a;libssl.a</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
<AdditionalIncludeDirectories>C:\Users\brega\OneDrive\Рабочий стол\lab03\laba01upd3\curl\include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>C:\Users\brega\OneDrive\Рабочий стол\lab03\laba01upd3\curl\lib</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>libcurl.lib;%(AdditionalDependencies);libcurl.dll.a;libcurl.dll.a;libcrypto.a;libssl.a</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="histogram.cpp" />
|
||||||
|
<ClCompile Include="laba01upd3.cpp" />
|
||||||
|
<ClCompile Include="svg.cpp" />
|
||||||
|
<ClCompile Include="text.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include=".gitignore" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="histogram.h" />
|
||||||
|
<ClInclude Include="histogram_internal.h" />
|
||||||
|
<ClInclude Include="svg.h" />
|
||||||
|
<ClInclude Include="text.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
48
laba01upd3.vcxproj.filters
Обычный файл
48
laba01upd3.vcxproj.filters
Обычный файл
@@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Исходные файлы">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Файлы заголовков">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Файлы ресурсов">
|
||||||
|
<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;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="laba01upd3.cpp">
|
||||||
|
<Filter>Исходные файлы</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="histogram.cpp">
|
||||||
|
<Filter>Исходные файлы</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="text.cpp">
|
||||||
|
<Filter>Исходные файлы</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="svg.cpp">
|
||||||
|
<Filter>Исходные файлы</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include=".gitignore" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="histogram.h">
|
||||||
|
<Filter>Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="text.h">
|
||||||
|
<Filter>Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="histogram_internal.h">
|
||||||
|
<Filter>Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="svg.h">
|
||||||
|
<Filter>Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
71
svg.cpp
Обычный файл
71
svg.cpp
Обычный файл
@@ -0,0 +1,71 @@
|
|||||||
|
#include "svg.h"
|
||||||
|
#include <string>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
void svg_begin(double width, double height) {
|
||||||
|
cout << "<?xml version='1.0' encoding='UTF-8'?>\n";
|
||||||
|
cout << "<svg ";
|
||||||
|
cout << "width='" << width << "' ";
|
||||||
|
cout << "height='" << height << "' ";
|
||||||
|
cout << "viewBox='0 0 " << width << " " << height << "' ";
|
||||||
|
cout << "xmlns='http://www.w3.org/2000/svg'>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void svg_end() {
|
||||||
|
cout << "</svg>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void svg_text(double left, double baseline, const string& text) {
|
||||||
|
cout << "<text x='" << left
|
||||||
|
<< "' y='" << baseline
|
||||||
|
<< "'>" << text
|
||||||
|
<< "</text>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void svg_rect(double x, double y, double width, double height,
|
||||||
|
const string& stroke, const string& fill) {
|
||||||
|
cout << "<rect x='" << x
|
||||||
|
<< "' y='" << y
|
||||||
|
<< "' width='" << width
|
||||||
|
<< "' height='" << height
|
||||||
|
<< "' stroke='" << stroke
|
||||||
|
<< "' fill='" << fill
|
||||||
|
<< "' />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void show_histogram_svg(const vector<size_t>& bins) {
|
||||||
|
const double IMAGE_WIDTH = 400;
|
||||||
|
const double IMAGE_HEIGHT = 300;
|
||||||
|
const double TEXT_LEFT = 20;
|
||||||
|
const double TEXT_BASELINE = 20;
|
||||||
|
const double TEXT_WIDTH = 50;
|
||||||
|
const double BIN_HEIGHT = 30;
|
||||||
|
const double BLOCK_WIDTH = 10;
|
||||||
|
|
||||||
|
svg_begin(IMAGE_WIDTH, IMAGE_HEIGHT);
|
||||||
|
|
||||||
|
size_t max_count = 0;
|
||||||
|
for (size_t count : bins) {
|
||||||
|
if (count > max_count) {
|
||||||
|
max_count = count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double max_width = IMAGE_WIDTH - TEXT_WIDTH;
|
||||||
|
double top = 0;
|
||||||
|
for (size_t count : bins) {
|
||||||
|
double bin_width;
|
||||||
|
if (max_count > 0) {
|
||||||
|
bin_width = static_cast<double>(count) / max_count * max_width;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bin_width = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg_text(TEXT_LEFT, top + TEXT_BASELINE, to_string(count));
|
||||||
|
svg_rect(TEXT_WIDTH, top, bin_width, BIN_HEIGHT, "blue", "blue");
|
||||||
|
top += BIN_HEIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg_end();
|
||||||
|
}
|
||||||
12
svg.h
Обычный файл
12
svg.h
Обычный файл
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
void svg_begin(double width, double height);
|
||||||
|
void svg_end();
|
||||||
|
void svg_text(double left, double baseline, const std::string& text);
|
||||||
|
void svg_rect(double x, double y, double width, double height,
|
||||||
|
const std::string& stroke = "black",
|
||||||
|
const std::string& fill = "black");
|
||||||
|
void show_histogram_svg(const std::vector<size_t>& bins);
|
||||||
33
text.cpp
Обычный файл
33
text.cpp
Обычный файл
@@ -0,0 +1,33 @@
|
|||||||
|
#include "text.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
const size_t SCREEN_WIDTH = 80;
|
||||||
|
const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1;
|
||||||
|
|
||||||
|
void show_histogram_text(const vector<size_t>& bins) {
|
||||||
|
size_t max_count = bins[0];
|
||||||
|
for (size_t count : bins) {
|
||||||
|
if (count > max_count)
|
||||||
|
max_count = count;
|
||||||
|
}
|
||||||
|
for (size_t j = 0; j < bins.size(); j++) {
|
||||||
|
if (bins[j] < 100) cerr << " ";
|
||||||
|
if (bins[j] < 10) cerr << " ";
|
||||||
|
cerr << bins[j] << "|";
|
||||||
|
|
||||||
|
size_t height = 0;
|
||||||
|
if (max_count > MAX_ASTERISK) {
|
||||||
|
height = static_cast<size_t>(
|
||||||
|
static_cast<double>(bins[j]) / max_count * MAX_ASTERISK
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
height = bins[j];
|
||||||
|
}
|
||||||
|
for (size_t i = 0; i < height; i++)
|
||||||
|
cerr << "*";
|
||||||
|
cerr << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
5
text.h
Обычный файл
5
text.h
Обычный файл
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
void show_histogram_text(const std::vector<size_t>& bins);
|
||||||
7134
unittest/doctest.h
Обычный файл
7134
unittest/doctest.h
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
6
unittest/histogram_internal.h
Обычный файл
6
unittest/histogram_internal.h
Обычный файл
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
bool find_minmax(const std::vector<double>& numbers,
|
||||||
|
double& min,
|
||||||
|
double& max);
|
||||||
37
unittest/unittest.cpp
Обычный файл
37
unittest/unittest.cpp
Обычный файл
@@ -0,0 +1,37 @@
|
|||||||
|
#define DOCTEST_CONFIG_NO_MULTITHREADING
|
||||||
|
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||||
|
#include "doctest.h"
|
||||||
|
#include "histogram_internal.h"
|
||||||
|
|
||||||
|
TEST_CASE("distinct positive numbers") {
|
||||||
|
double min = 0, max = 0;
|
||||||
|
find_minmax({ 1, 2 }, min, max);
|
||||||
|
CHECK(min == 1);
|
||||||
|
CHECK(max == 2);
|
||||||
|
}
|
||||||
|
TEST_CASE("empty vector") {
|
||||||
|
double min = 0, max = 0;
|
||||||
|
CHECK(!find_minmax({}, min, max));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("single element") {
|
||||||
|
double min = 0, max = 0;
|
||||||
|
find_minmax({ 5.5 }, min, max);
|
||||||
|
CHECK(min == 5.5);
|
||||||
|
CHECK(max == 5.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("all negative") {
|
||||||
|
double min = 0, max = 0;
|
||||||
|
find_minmax({ -1, -5, -3 }, min, max);
|
||||||
|
CHECK(min == -5);
|
||||||
|
CHECK(max == -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_CASE("all equal") {
|
||||||
|
double min = 0, max = 0;
|
||||||
|
find_minmax({ 7, 7, 7 }, min, max);
|
||||||
|
CHECK(min == 7);
|
||||||
|
CHECK(max == 7);
|
||||||
|
}
|
||||||
31
unittest/unittest.sln
Обычный файл
31
unittest/unittest.sln
Обычный файл
@@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.11.35219.272
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest", "unittest.vcxproj", "{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Release|x64.Build.0 = Release|x64
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{07F838BF-1065-4D95-9EAC-CA2A1E9B6597}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {2255668F-5514-4CA2-A148-57740FB6F361}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
141
unittest/unittest.vcxproj
Обычный файл
141
unittest/unittest.vcxproj
Обычный файл
@@ -0,0 +1,141 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" 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>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<ProjectGuid>{07f838bf-1065-4d95-9eac-ca2a1e9b6597}</ProjectGuid>
|
||||||
|
<RootNamespace>unittest</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<ConformanceMode>true</ConformanceMode>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\histogram.cpp" />
|
||||||
|
<ClCompile Include="unittest.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\doctest.h" />
|
||||||
|
<ClInclude Include="..\histogram.h" />
|
||||||
|
<ClInclude Include="..\histogram_internal.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
36
unittest/unittest.vcxproj.filters
Обычный файл
36
unittest/unittest.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="Исходные файлы">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Файлы ресурсов">
|
||||||
|
<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;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Исходные файлы\Файлы заголовков">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\histogram.cpp">
|
||||||
|
<Filter>Исходные файлы</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="unittest.cpp">
|
||||||
|
<Filter>Исходные файлы</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\histogram_internal.h">
|
||||||
|
<Filter>Исходные файлы\Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\doctest.h">
|
||||||
|
<Filter>Исходные файлы\Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\histogram.h">
|
||||||
|
<Filter>Исходные файлы\Файлы заголовков</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
Ссылка в новой задаче
Block a user