Skip to content

Commit dd3dde7

Browse files
author
Jegors Čemisovs
committed
Add GraphShell.md
1 parent 60153b0 commit dd3dde7

File tree

12 files changed

+18
-2
lines changed

12 files changed

+18
-2
lines changed

.idea/gradle.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/GraphShell.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: post title: Sample application: Graph Shell
3+
---
4+
5+
## About
6+
7+
To demonstrate the work of search algorithms, I made a small console program. The program allows you to select one of
8+
three graph samples and search for a path using two algorithms.
9+
File renamed without changes.

sample-cli/src/main/java/lv/id/jc/graph/cli/Commands.java renamed to graph-shell/src/main/java/lv/id/jc/graph/cli/Commands.java

+7
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ public double distance(List<String> path) {
6060
return graph.getDistance(path);
6161
}
6262

63+
/**
64+
* Implementation of java bean verification for @Vertex annotation
65+
*
66+
* @param value to check
67+
* @param context of validation
68+
* @return is value existing vertex in the graph scheme
69+
*/
6370
@Override
6471
public boolean isValid(String value, ConstraintValidatorContext context) {
6572
return graph.schema().containsKey(value);

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
rootProject.name = 'algorithms'
2-
include 'algorithm', 'sample-java', 'sample-groovy', 'sample-cli'
2+
include 'algorithm', 'sample-java', 'sample-groovy', 'graph-shell'

0 commit comments

Comments
 (0)