Skip to content

Feedback #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 156 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
0198314
Setting up GitHub Classroom Feedback
github-classroom[bot] May 15, 2024
0acceec
Initial commit
b08lsoai May 17, 2024
321090e
feat: create LICENSE
b08lsoai May 17, 2024
45213d1
refactor: corrected names in the LICENSE
b08lsoai May 17, 2024
ecbcfd9
Merge pull request #2 from spbu-coding-2023/develop
b08lsoai May 17, 2024
08caa27
feat: added vertex, edge and graph classes
b08lsoai May 17, 2024
60de905
refactor: removed vertex id
b08lsoai May 18, 2024
5c23eb9
refactor: transition to a new architecture
b08lsoai May 23, 2024
72ce09c
resolve conflict
b08lsoai May 23, 2024
742f721
feat: added Dijkstra algorithm
b08lsoai May 23, 2024
43fb452
refactor: extracted variables to class scope
b08lsoai May 24, 2024
279b0c6
docs: added documentation to Dijkstra's algorithm
b08lsoai May 28, 2024
4ea491b
refactor: corrected import in Dijkstra's algorithm
b08lsoai May 28, 2024
e01009b
feat: added Kosaraju's algorithm
b08lsoai May 28, 2024
862bce4
docs: added documentation to Kosaraju's algorithm
b08lsoai May 28, 2024
e6d7f54
fix: fixed 'adjacency' logic
b08lsoai May 29, 2024
e3e0b77
chore: add testing dependencies
b08lsoai May 29, 2024
6feda7a
test: added tests for Dijkstra's algorithm
b08lsoai May 29, 2024
546be30
test: added tests for Kosaraju's algorithm
b08lsoai May 29, 2024
37c9559
feat: added Louvain's algorithm
b08lsoai May 29, 2024
758502c
test: added tests for Louvain's algorithm
b08lsoai May 29, 2024
d3c5af4
refactor: replaced wildcard with specific imports
b08lsoai May 29, 2024
e2155dd
Merge branch 'feature/Louvain' into develop
b08lsoai May 29, 2024
7f36d03
Merge branch 'feature/Kosaraju' into develop
b08lsoai May 29, 2024
e18da17
Merge branch 'dev/model-graph' into develop
b08lsoai May 29, 2024
f576f31
feat: added Prim algorithm
MigunovaAnastasia1 May 29, 2024
19b5021
Merge branch 'feature/Dijkstra' into develop
b08lsoai May 29, 2024
4a6fb9c
feat: added CycleSearch algorithm
MigunovaAnastasia1 May 29, 2024
0a46815
test: added tests for Prim's algorithm
MigunovaAnastasia1 May 29, 2024
42e88cf
feat: added gui base
b08lsoai May 29, 2024
045977f
test: added tests for CycleSearch's algorithm
MigunovaAnastasia1 May 29, 2024
7090c37
feat: added BellmanFord algorithm
Kirilich May 29, 2024
79adb41
feat: added tests for BellmanFord algorithm
Kirilich May 29, 2024
77e3dbe
Merge pull request #3 from spbu-coding-2023/feature/BellmanFord
Kirilich May 29, 2024
99a3955
feat: added BridgeFinder algorithm
Kirilich May 29, 2024
aac083a
feat: added tests for BridgeFinder algorithm
Kirilich May 29, 2024
a1d5a7d
fix: deleted BridgeFinder algorithm and tests
Kirilich May 29, 2024
a418912
feat: added BridgeFinder algorithm
Kirilich May 29, 2024
300aa60
feat: added tests for BridgeFinder algorithm
Kirilich May 29, 2024
cf95cba
Merge branch 'develop' of github.com:spbu-coding-2023/graphs-graphs-1…
Kirilich May 29, 2024
d79dcb1
Merge branch 'feature/CycleSearch' into develop
MigunovaAnastasia1 May 29, 2024
4c658b8
fix: changed package alghoritm BellmanFord
Kirilich May 29, 2024
33e82f5
Merge branch 'feature/BellmanFord' into develop
Kirilich May 29, 2024
6d0c42f
Merge branch 'develop' of github.com:spbu-coding-2023/graphs-graphs-1…
MigunovaAnastasia1 May 29, 2024
b2b3c69
Merge pull request #4 from spbu-coding-2023/develop
b08lsoai May 29, 2024
a6a0484
feat: remade Prim's algorithm
MigunovaAnastasia1 Aug 12, 2024
590c423
test: rewrote all tests for Prim's algorithm and added file with auxi…
MigunovaAnastasia1 Aug 12, 2024
e2af465
feat: added KDoc documentation for Prim's algorithm
MigunovaAnastasia1 Aug 14, 2024
81fdf68
Merge branch 'feature/Prim' into develop
MigunovaAnastasia1 Aug 14, 2024
4487150
feat Prim: deleted unnecessary import
MigunovaAnastasia1 Aug 14, 2024
86b396b
ci: added workflow for setting ci
MigunovaAnastasia1 Aug 14, 2024
5ed3196
ci: changed permission of gradlew
MigunovaAnastasia1 Aug 14, 2024
b8f0f53
ci: trigger ci
MigunovaAnastasia1 Aug 14, 2024
57d0970
ci: changed the trigger to activate the workflow
MigunovaAnastasia1 Aug 14, 2024
45196ff
ci: configured workflow_dispatch trigger
MigunovaAnastasia1 Aug 14, 2024
af64478
remade CycleSearch algorithm
MigunovaAnastasia1 Aug 16, 2024
5035977
test: rewrote all tests for CycleSearch algorithm
MigunovaAnastasia1 Aug 16, 2024
57f7caa
feat: added KDoc documentation for CycleSearch algorithm
MigunovaAnastasia1 Aug 16, 2024
f62c3da
Merge branch 'feature/CycleSearch' into develop
MigunovaAnastasia1 Aug 16, 2024
e5687cd
feat: added functions of removing edge and removing vertex for graph-…
MigunovaAnastasia1 Aug 16, 2024
8193523
Merge branch 'dev/model-graph' into develop
MigunovaAnastasia1 Aug 16, 2024
2781403
feat: added harmonicCentrality algorithm
MigunovaAnastasia1 Sep 3, 2024
5927fec
test: added tests for HarmonicCentrality algorithm
MigunovaAnastasia1 Sep 3, 2024
12c5a16
feat: added KDoc documentation for HarmonicCentrality algorithm
MigunovaAnastasia1 Sep 3, 2024
7a56ca4
style: formatted code
b08lsoai Sep 22, 2024
f08021a
fix: corrected color of the first vertex
b08lsoai Sep 22, 2024
83d49e7
Merge branch 'feature/gui' into develop
b08lsoai Sep 22, 2024
9cf73f2
style: variable renamed
b08lsoai Sep 22, 2024
e2e80b7
fix: vertex values ​​moved
b08lsoai Sep 22, 2024
fb3b5a9
refactor: replaced vertices with their indices
b08lsoai Sep 22, 2024
f4e8fd8
style: formatted code
b08lsoai Sep 22, 2024
9be7e20
Merge branch 'feature/gui' into develop
b08lsoai Sep 22, 2024
2ee32cc
fix: unused function removed
b08lsoai Sep 22, 2024
77d737a
feat: added display of Dijkstra's algorithm
b08lsoai Sep 22, 2024
723d3a6
feat: added display of Kosaraju's algorithm
b08lsoai Sep 22, 2024
c709cf1
feat: added display of Louvain's algorithm
b08lsoai Sep 22, 2024
9c42d27
feat: added documentation to functions
b08lsoai Sep 22, 2024
b658080
fix: the color of the initial vertices has been changed
b08lsoai Sep 22, 2024
507aa69
feat: added working button for Dijkstra algorithm
b08lsoai Sep 22, 2024
87874e3
feat: added working button for Louvain & Kosaraju
b08lsoai Sep 22, 2024
fc54332
fix: vertex colors changed
b08lsoai Sep 22, 2024
c22df9f
fix: vertex colors changed
b08lsoai Sep 22, 2024
9002ad1
Merge branch 'develop' into feature/gui
b08lsoai Sep 22, 2024
55fe3b8
refactor: moved methods
b08lsoai Sep 22, 2024
99c188d
refactor: updated Main.kt
b08lsoai Sep 23, 2024
c109a71
feat(VertexView): added func to determine color
b08lsoai Sep 23, 2024
5c454e1
feat: added viewmodel for adding vertex
b08lsoai Sep 23, 2024
aa4b4e4
feat: added viewmodel for removing vertex
b08lsoai Sep 23, 2024
adbda3a
feat: added viewmodel for added edge
b08lsoai Sep 23, 2024
71d9291
feat: added viewmodel for removing edge
b08lsoai Sep 23, 2024
9a07cbd
feat: added func for removing/adding vertex/edge
b08lsoai Sep 23, 2024
888da2c
feat: added menu for removing/adding vertex/edge
b08lsoai Sep 23, 2024
475d892
feat: added 'add vertex' dialog
b08lsoai Sep 23, 2024
a981f35
feat: added 'remove vertex' dialog
b08lsoai Sep 23, 2024
83553e4
feat: added 'add edge' dialog
b08lsoai Sep 23, 2024
39bb9bf
feat: added 'remove edge' dialog
b08lsoai Sep 23, 2024
02de1ab
refactor: updated Main.kt
b08lsoai Sep 23, 2024
ae3f50c
chore: dialogues are placed in the new file
b08lsoai Sep 23, 2024
bdcb5ab
fix: fixed incorrect access to variables
b08lsoai Sep 23, 2024
be55a71
Merge branch 'develop'
b08lsoai Sep 23, 2024
189048c
fix: fixed a bug when deleting an edge
b08lsoai Sep 23, 2024
e4e7bb5
fix: updated gui after bug fix
b08lsoai Sep 23, 2024
9f6c4ca
feat: added more colors for algorithms
b08lsoai Sep 23, 2024
2213da7
style: checkbox made more beautiful
b08lsoai Sep 24, 2024
a2592fb
feat: added color and width variables for viewModelEdge and default s…
MigunovaAnastasia1 Sep 24, 2024
8f1f0dd
feat: added a function to calculate the coordinates of the edge ends
MigunovaAnastasia1 Sep 24, 2024
b5cd342
style(MainScreen): the code is formatted
b08lsoai Sep 24, 2024
f1ef7a2
feat: added botton for Prim's algorithm execution and connected strok…
MigunovaAnastasia1 Sep 24, 2024
228f616
feat: added botton for CycleSearch algorithm execution
MigunovaAnastasia1 Sep 24, 2024
5693bd4
feat: added file with themes and colors
b08lsoai Sep 24, 2024
646c89b
feat: dependencies added
b08lsoai Sep 24, 2024
30353aa
feat: added color dependencies on theme
b08lsoai Sep 24, 2024
e299845
fix: algorithms searchCycle and Prim moved
b08lsoai Sep 24, 2024
856a9cf
Merge branch 'develop'
b08lsoai Sep 24, 2024
77d6aa2
feat: added highlighting of edges in Dijkstra
b08lsoai Sep 24, 2024
5d02acf
feat: added neo4j dependencies
b08lsoai Sep 26, 2024
8abe734
feat: added neo4j repository
b08lsoai Sep 26, 2024
154ead8
feat: added Neo4j dialog
b08lsoai Sep 26, 2024
e50d7ee
feat: saving to neo4j added to gui
b08lsoai Sep 26, 2024
91dd51e
refactor: variable renamed
b08lsoai Sep 26, 2024
7566fb4
refactor: function replaced with string
b08lsoai Sep 26, 2024
ff6ec02
feat: added loading from Neo4j
b08lsoai Oct 7, 2024
10d8795
feat: added Welcome screen
b08lsoai Oct 7, 2024
fe8e96d
fix: renamed function
b08lsoai Oct 7, 2024
bb7cd76
fix: allowed graph data type changed
b08lsoai Oct 7, 2024
f0456a0
refactor: renamed variable
b08lsoai Oct 8, 2024
ca31200
fix: allowed graph data type changed
MigunovaAnastasia1 Oct 8, 2024
530358c
feat: added opening graph from file
MigunovaAnastasia1 Oct 8, 2024
ba41e76
fix: added error handling for some algorithms
MigunovaAnastasia1 Oct 8, 2024
e8fec3f
fix: deleted an unnecessary test
MigunovaAnastasia1 Oct 9, 2024
d670f09
feat: added graph type storage in Neo4j
b08lsoai Oct 9, 2024
8417449
fix: changed button text
b08lsoai Oct 9, 2024
6f981c0
feat: added error catching in Neo4j
b08lsoai Oct 9, 2024
de78380
refactor: removed unnecessary comment
b08lsoai Oct 9, 2024
176788f
feat: added docs
b08lsoai Oct 9, 2024
94b4e7f
feat: added catching errors
b08lsoai Oct 9, 2024
ee92e2f
feat: added Neo4j dialog when loading
b08lsoai Oct 9, 2024
fc6dde1
fix: weight display made correct
b08lsoai Oct 9, 2024
5269c02
feat: added display of indexes
b08lsoai Oct 9, 2024
95b5a58
feat: changed color id vertex
b08lsoai Oct 9, 2024
c0506fb
fix: fixed a bug in highlighting edges in Dijkstra
b08lsoai Oct 9, 2024
0ac0044
fix: changed error window
b08lsoai Oct 10, 2024
2d48498
chore: imports optimized
b08lsoai Oct 10, 2024
87ac35b
fix: the buttons are aligned
b08lsoai Oct 11, 2024
5670dda
fix: catching errors is done better
b08lsoai Oct 15, 2024
2eadcc0
refactor: renamed and moved variable
b08lsoai Oct 30, 2024
257923f
fix: the theme button is positioned correctly
b08lsoai Oct 30, 2024
b09c882
Merge branch 'feature/gui' into develop
b08lsoai Oct 30, 2024
6d14a92
fix: fixed the bug in the cycle search algorithm on model-level
MigunovaAnastasia1 Oct 31, 2024
38720be
Merge branch 'feature/CycleSearch' into develop
MigunovaAnastasia1 Oct 31, 2024
25b1a88
fix: changed the coordinates of the circle center, which provides the…
MigunovaAnastasia1 Oct 31, 2024
5a14cf6
fix: deleted the unnecessary output in stdout
MigunovaAnastasia1 Oct 31, 2024
a0e4690
rep: added examples of graphs that can be read from the json-files
MigunovaAnastasia1 Oct 31, 2024
418f071
feat: added botton for HarmonicCentrality algorithm execution and mad…
MigunovaAnastasia1 Oct 31, 2024
71f05c5
Merge pull request #8 from spbu-coding-2023/develop
MigunovaAnastasia1 Nov 1, 2024
324b669
Merge pull request #9 from spbu-coding-2023/develop
MigunovaAnastasia1 Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test # autorun of the project build and tests

on:
workflow_dispatch:
pull_request:
paths:
- '**.kt'
push:
paths:
- '**.kt'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: zulu
- name: Build
run: ./gradlew build -x test
- name: Test
run: ./gradlew test
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Nabieva Liya, Tenyaeva Ekaterina, Migunova Anastasia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
48 changes: 48 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
kotlin("jvm")
id("org.jetbrains.compose")
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}

dependencies {
// Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet
// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
implementation(compose.desktop.currentOs)
implementation(compose.material3)
implementation(compose.materialIconsExtended)
implementation("org.neo4j.driver", "neo4j-java-driver", "5.6.0")
implementation("com.google.code.gson:gson:2.10.1")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("io.kotest:kotest-runner-junit5-jvm:4.6.0")
}

tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(21)
}

compose.desktop {
application {
mainClass = "MainKt"

nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "graph13"
packageVersion = "1.0.0"
}
}
}
1 change: 1 addition & 0 deletions examples/dirLotsOfEdges.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"adjacency":{"1":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{"8":0},"8":{"9":19},"9":{"7":2},"11":{},"12":{},"15":{},"19":{}},"vertices":{"1":{"id":1,"data":"1"},"2":{"id":2,"data":"2"},"3":{"id":3,"data":"3"},"4":{"id":4,"data":"4"},"5":{"id":5,"data":"5"},"6":{"id":6,"data":"6"},"7":{"id":7,"data":"7"},"8":{"id":8,"data":"8"},"9":{"id":9,"data":"9"},"10":{"id":10,"data":"10"},"11":{"id":11,"data":"11"},"12":{"id":12,"data":"12"},"13":{"id":13,"data":"13"},"14":{"id":14,"data":"14"},"15":{"id":15,"data":"15"},"16":{"id":16,"data":"16"},"17":{"id":17,"data":"17"},"18":{"id":18,"data":"18"},"19":{"id":19,"data":"19"},"20":{"id":20,"data":"20"}},"edges":[{"vertices":{"first":7,"second":8},"weight":0},{"vertices":{"first":8,"second":9},"weight":19},{"vertices":{"first":9,"second":7},"weight":2},{"vertices":{"first":1,"second":2},"weight":0},{"vertices":{"first":1,"second":3},"weight":0},{"vertices":{"first":1,"second":4},"weight":0},{"vertices":{"first":5,"second":6},"weight":0},{"vertices":{"first":18,"second":9},"weight":0},{"vertices":{"first":20,"second":14},"weight":0},{"vertices":{"first":12,"second":20},"weight":0},{"vertices":{"first":17,"second":13},"weight":0},{"vertices":{"first":1,"second":20},"weight":0},{"vertices":{"first":12,"second":6}},{"vertices":{"first":19,"second":12}},{"vertices":{"first":6,"second":18}},{"vertices":{"first":1,"second":14}},{"vertices":{"first":1,"second":15}},{"vertices":{"first":6,"second":20}},{"vertices":{"first":12,"second":1}},{"vertices":{"first":9,"second":19}},{"vertices":{"first":12,"second":9}},{"vertices":{"first":15,"second":6}},{"vertices":{"first":15,"second":5}},{"vertices":{"first":4,"second":11}},{"vertices":{"first":11,"second":20}},{"vertices":{"first":1,"second":9}},{"vertices":{"first":1,"second":18}},{"vertices":{"first":19,"second":1}},{"vertices":{"first":15,"second":19}},{"vertices":{"first":6,"second":19}}]}
1 change: 1 addition & 0 deletions examples/undirAverageNumberOfEdges.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"adjacency":{"1":{"10":5},"2":{"3":52,"4":10,"6":17,"9":65,"10":8},"3":{"2":52,"6":32,"8":14},"4":{"2":10,"5":18},"5":{"4":18,"8":20},"6":{"2":17,"3":32,"10":71},"7":{},"8":{"3":14,"5":20,"9":3,"10":21},"9":{"2":65,"8":3},"10":{"1":5,"2":8,"6":71,"8":21},"11":{"12":4},"12":{"11":4}},"vertices":{"1":{"id":1,"data":"1"},"2":{"id":2,"data":"2"},"3":{"id":3,"data":"3"},"4":{"id":4,"data":"4"},"5":{"id":5,"data":"5"},"6":{"id":6,"data":"6"},"7":{"id":7,"data":"7"},"8":{"id":8,"data":"8"},"9":{"id":9,"data":"9"},"10":{"id":10,"data":"10"},"11":{"id":11,"data":"11"},"12":{"id":12,"data":"12"}},"edges":[{"vertices":{"first":8,"second":5},"weight":20},{"vertices":{"first":5,"second":8},"weight":20},{"vertices":{"first":5,"second":4},"weight":18},{"vertices":{"first":4,"second":5},"weight":18},{"vertices":{"first":8,"second":9},"weight":3},{"vertices":{"first":9,"second":8},"weight":3},{"vertices":{"first":8,"second":3},"weight":14},{"vertices":{"first":3,"second":8},"weight":14},{"vertices":{"first":3,"second":6},"weight":32},{"vertices":{"first":6,"second":3},"weight":32},{"vertices":{"first":2,"second":9},"weight":65},{"vertices":{"first":9,"second":2},"weight":65},{"vertices":{"first":2,"second":3},"weight":52},{"vertices":{"first":3,"second":2},"weight":52},{"vertices":{"first":2,"second":4},"weight":10},{"vertices":{"first":4,"second":2},"weight":10},{"vertices":{"first":2,"second":6},"weight":17},{"vertices":{"first":6,"second":2},"weight":17},{"vertices":{"first":11,"second":12},"weight":4},{"vertices":{"first":12,"second":11},"weight":4},{"vertices":{"first":10,"second":8},"weight":21},{"vertices":{"first":8,"second":10},"weight":21},{"vertices":{"first":10,"second":6},"weight":71},{"vertices":{"first":6,"second":10},"weight":71},{"vertices":{"first":10,"second":1},"weight":5},{"vertices":{"first":1,"second":10},"weight":5},{"vertices":{"first":10,"second":2},"weight":8},{"vertices":{"first":2,"second":10},"weight":8}]}
1 change: 1 addition & 0 deletions examples/undirSimpleGraph.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"adjacency":{"1":{"2":3,"3":45,"5":21},"2":{"1":3,"4":20,"5":17},"3":{"1":45,"4":17,"5":8},"4":{"2":20,"3":17,"5":8},"5":{"1":21,"2":17,"3":8,"4":8}},"vertices":{"1":{"id":1,"data":"1"},"2":{"id":2,"data":"2"},"3":{"id":3,"data":"3"},"4":{"id":4,"data":"4"},"5":{"id":5,"data":"5"}},"edges":[{"vertices":{"first":1,"second":2},"weight":3},{"vertices":{"first":2,"second":1},"weight":3},{"vertices":{"first":2,"second":4},"weight":20},{"vertices":{"first":4,"second":2},"weight":20},{"vertices":{"first":1,"second":5},"weight":21},{"vertices":{"first":5,"second":1},"weight":21},{"vertices":{"first":4,"second":3},"weight":17},{"vertices":{"first":3,"second":4},"weight":17},{"vertices":{"first":5,"second":2},"weight":17},{"vertices":{"first":2,"second":5},"weight":17},{"vertices":{"first":3,"second":5},"weight":8},{"vertices":{"first":5,"second":3},"weight":8},{"vertices":{"first":3,"second":1},"weight":45},{"vertices":{"first":1,"second":3},"weight":45},{"vertices":{"first":4,"second":5},"weight":8},{"vertices":{"first":5,"second":4},"weight":8}]}
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
kotlin.code.style=official
kotlin.version=1.9.22
compose.version=1.6.0
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
234 changes: 234 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################

# Attempt to set APP_HOME

# Resolve links: $0 may be a link
app_path=$0

# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

warn () {
echo "$*"
} >&2

die () {
echo
echo "$*"
echo
exit 1
} >&2

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi

# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.

# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

JAVACMD=$( cygpath --unix "$JAVACMD" )

# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#

eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'

exec "$JAVACMD" "$@"
Loading