mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-05 12:05:58 +01:00
Move WoT algorithm implementation to the query package
This commit is contained in:
parent
cee061d01c
commit
1861287703
8 changed files with 14 additions and 38 deletions
|
@ -1,5 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.wot.dijkstra;
|
|
@ -1,8 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.wot.dijkstra
|
||||
package org.pgpainless.wot.query
|
||||
|
||||
import kotlin.math.min
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.wot.dijkstra
|
||||
package org.pgpainless.wot.query
|
||||
|
||||
import org.pgpainless.wot.network.EdgeComponent
|
||||
|
|
@ -1,10 +1,6 @@
|
|||
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.pgpainless.wot.query
|
||||
|
||||
package org.pgpainless.wot.dijkstra
|
||||
|
||||
import java.util.PriorityQueue
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* A de-duplicating min-priority queue for key-value pairs.
|
|
@ -1,12 +1,9 @@
|
|||
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
package org.pgpainless.wot.query
|
||||
|
||||
package org.pgpainless.wot.dijkstra
|
||||
|
||||
import org.pgpainless.wot.network.*
|
||||
import org.pgpainless.wot.query.Path
|
||||
import org.pgpainless.wot.query.Paths
|
||||
import org.pgpainless.wot.network.Fingerprint
|
||||
import org.pgpainless.wot.network.Network
|
||||
import org.pgpainless.wot.network.Node
|
||||
import org.pgpainless.wot.network.Roots
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import kotlin.math.max
|
||||
|
@ -289,4 +286,4 @@ class Query(private val rawNetwork: Network,
|
|||
|
||||
return p
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +1,6 @@
|
|||
// SPDX-FileCopyrightText: 2023 Heiko Schaefer <heiko@schaefer.name>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.wot.dijkstra
|
||||
package org.pgpainless.wot.query
|
||||
|
||||
import org.pgpainless.wot.network.*
|
||||
import org.pgpainless.wot.query.Path
|
||||
|
||||
/**
|
||||
* A wrapper for `Network` that performs the following functions:
|
|
@ -2,8 +2,9 @@
|
|||
//
|
||||
// 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
|
||||
|
||||
class CostTest {
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.wot.dijkstra
|
||||
package org.pgpainless.wot.query
|
||||
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
Loading…
Reference in a new issue