-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Поправил замечания, дописал интерфейс, добавил несколько тестов под г…
…енератор точек, создал readme, перенес тесты из отдельного проекта в основной
- Loading branch information
Showing
18 changed files
with
170 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
cs/TagsCloudVisualization/CloudLayouter/ICircularCloudLayouterExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Drawing; | ||
|
||
namespace TagsCloudVisualization.CloudLayouter; | ||
|
||
public static class ICircularCloudLayouterExtensions | ||
{ | ||
public static void GenerateCloud(this ICircularCloudLayouter cloudLayouter, | ||
int rectanglesNumber = 1000, | ||
int minRectangleSize = 10, | ||
int maxRectangleSize = 50) | ||
{ | ||
var random = new Random(); | ||
new Rectangle[rectanglesNumber] | ||
.Select(x => new Size( | ||
random.Next(minRectangleSize, maxRectangleSize), | ||
random.Next(minRectangleSize, maxRectangleSize))) | ||
.Select(size => cloudLayouter.PutNextRectangle(size)) | ||
.ToArray(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions
8
cs/TagsCloudVisualization/PointsGenerators/IPointsGenerator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Drawing; | ||
|
||
namespace TagsCloudVisualization.PointsGenerators; | ||
|
||
public interface IPointsGenerator | ||
{ | ||
Point GetNextPointPosition(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
1000 прямоугольников шаг 0.1 угловое смещение 0.1 <img scr="Images\1000_0.1_0.1_TagCloud.jpg"> | ||
1000 прямоугольников шаг 0.01 угловое смещение 0.01 <img scr="Images\1000_0.01_0.01_TagCloud.jpg"> | ||
1000 прямоугольников шаг 1 угловое смещение 1 <img scr="Images\1000_1_1_TagCloud.jpg"> | ||
1000 прямоугольников шаг 10 угловое смещение 0.01 <img scr="Images\1000_10_0.01_TagCloud.jpg"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.