Skip to content

Commit 08618b4

Browse files
author
Зелёный Андрей Сергеевич
committed
Add project files.
1 parent c5d9267 commit 08618b4

10 files changed

+260
-0
lines changed

App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5+
</startup>
6+
</configuration>

Dijkstra.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DijkstraAlgorithm
8+
{
9+
public class Dijkstra
10+
{
11+
12+
}
13+
}

DijkstraAlgorithm.csproj

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{F9F1635D-E39B-4963-B656-AA5708F2C4F9}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>DijkstraAlgorithm</RootNamespace>
10+
<AssemblyName>DijkstraAlgorithm</AssemblyName>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="System.Data.DataSetExtensions" />
40+
<Reference Include="Microsoft.CSharp" />
41+
<Reference Include="System.Data" />
42+
<Reference Include="System.Net.Http" />
43+
<Reference Include="System.Xml" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="Dijkstra.cs" />
47+
<Compile Include="Edge.cs" />
48+
<Compile Include="Graph.cs" />
49+
<Compile Include="Program.cs" />
50+
<Compile Include="Properties\AssemblyInfo.cs" />
51+
<Compile Include="Surface.cs" />
52+
<Compile Include="Vertex.cs" />
53+
</ItemGroup>
54+
<ItemGroup>
55+
<None Include="App.config" />
56+
</ItemGroup>
57+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
58+
</Project>

DijkstraAlgorithm.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30804.86
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DijkstraAlgorithm", "DijkstraAlgorithm.csproj", "{F9F1635D-E39B-4963-B656-AA5708F2C4F9}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{F9F1635D-E39B-4963-B656-AA5708F2C4F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{F9F1635D-E39B-4963-B656-AA5708F2C4F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{F9F1635D-E39B-4963-B656-AA5708F2C4F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{F9F1635D-E39B-4963-B656-AA5708F2C4F9}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {9EF6B077-CD00-4F56-940F-F9FEF350210A}
24+
EndGlobalSection
25+
EndGlobal

Edge.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DijkstraAlgorithm
8+
{
9+
public class Edge
10+
{
11+
public double Weight { get; set; }
12+
13+
public Vertex VertexFrom { get; set; }
14+
15+
public Vertex VertexTo { get; set; }
16+
17+
public Edge(double Weight)
18+
{
19+
this.Weight = Weight;
20+
}
21+
}
22+
}

Graph.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DijkstraAlgorithm
8+
{
9+
public class Graph
10+
{
11+
public double dx { get; set; }
12+
public double dy { get; set; }
13+
public int N { get; set; }
14+
public int M { get; set; }
15+
public Vertex[,] Vertices { get; }
16+
public Func<double, double, double> SurfaceFunc { get; set; }
17+
18+
public Graph(double dx, double dy, int N, int M, Func<double, double, double> SurfaceFunc)
19+
{
20+
this.N = N;
21+
this.M = M;
22+
this.dx = dx;
23+
this.dy = dy;
24+
this.SurfaceFunc = SurfaceFunc;
25+
26+
Vertices = new Vertex[N, M];
27+
28+
for (int i = 0; i < N; i++)
29+
for (int j = 0; j < M; j++)
30+
{
31+
double height = SurfaceFunc(i * dx, j * dy);
32+
Vertices[i, j] = new Vertex(height);
33+
}
34+
}
35+
}
36+
}

Program.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DijkstraAlgorithm
8+
{
9+
class Program
10+
{
11+
static void Main(string[] args)
12+
{
13+
int N = 3;
14+
int M = 5;
15+
16+
double dx = 1;
17+
double dy = 1;
18+
19+
20+
Graph graph = new Graph(dx, dy, N, M, Surface.Plane);
21+
22+
Console.ReadLine();
23+
}
24+
}
25+
}

Properties/AssemblyInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("DijkstraAlgorithm")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("DijkstraAlgorithm")]
13+
[assembly: AssemblyCopyright("Copyright © 2022")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("f9f1635d-e39b-4963-b656-aa5708f2c4f9")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Surface.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DijkstraAlgorithm
8+
{
9+
public static class Surface
10+
{
11+
public static double Plane(double x, double y)
12+
{
13+
double z = 0.0;
14+
return z;
15+
}
16+
}
17+
}

Vertex.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace DijkstraAlgorithm
8+
{
9+
public class Vertex
10+
{
11+
public double Height { get; set; }
12+
public bool IsVisited { get; set; }
13+
public double Label { get; set; }
14+
15+
public Vertex(double Height, bool IsVisited = false, double Label = double.PositiveInfinity)
16+
{
17+
this.Height = Height;
18+
this.IsVisited = IsVisited;
19+
this.Label = Label;
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)