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

Merge remote-tracking branch 'hkos/heiko/algo' into wot

This commit is contained in:
Paul Schaub 2023-07-17 12:47:39 +02:00
commit 5f447dc9d5
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
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>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.wot.dijkstra
package org.pgpainless.wot.query
import kotlin.math.min

View file

@ -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

View file

@ -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.

View file

@ -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
}
}
}

View file

@ -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:

View file

@ -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 {

View file

@ -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