1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-25 12:27:58 +01:00

Move WoT algorithm implementation to the query package

This commit is contained in:
Heiko Schaefer 2023-07-17 12:40:33 +02:00
parent cee061d01c
commit 1861287703
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D
8 changed files with 14 additions and 38 deletions

View file

@ -1,5 +0,0 @@
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra;

View file

@ -1,8 +1,4 @@
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name> package org.pgpainless.wot.query
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra
import kotlin.math.min import kotlin.math.min

View file

@ -1,8 +1,4 @@
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name> package org.pgpainless.wot.query
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra
import org.pgpainless.wot.network.EdgeComponent import org.pgpainless.wot.network.EdgeComponent

View file

@ -1,10 +1,6 @@
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name> package org.pgpainless.wot.query
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra import java.util.*
import java.util.PriorityQueue
/** /**
* A de-duplicating min-priority queue for key-value pairs. * A de-duplicating min-priority queue for key-value pairs.

View file

@ -1,12 +1,9 @@
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name> package org.pgpainless.wot.query
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra import org.pgpainless.wot.network.Fingerprint
import org.pgpainless.wot.network.Network
import org.pgpainless.wot.network.* import org.pgpainless.wot.network.Node
import org.pgpainless.wot.query.Path import org.pgpainless.wot.network.Roots
import org.pgpainless.wot.query.Paths
import org.slf4j.Logger import org.slf4j.Logger
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import kotlin.math.max import kotlin.math.max

View file

@ -1,11 +1,6 @@
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name> package org.pgpainless.wot.query
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra
import org.pgpainless.wot.network.* import org.pgpainless.wot.network.*
import org.pgpainless.wot.query.Path
/** /**
* A wrapper for `Network` that performs the following functions: * A wrapper for `Network` that performs the following functions:

View file

@ -2,8 +2,9 @@
// //
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra package org.pgpainless.wot.query
import org.pgpainless.wot.query.Cost
import kotlin.test.Test import kotlin.test.Test
class CostTest { class CostTest {

View file

@ -2,7 +2,7 @@
// //
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra package org.pgpainless.wot.query
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals