Change trajectory package

This commit is contained in:
Alexander Nozik 2023-04-16 20:50:51 +03:00
parent 3fc52dd60f
commit cdaa17a3b9
18 changed files with 30 additions and 40 deletions

View File

@ -10,7 +10,7 @@ val kmathVersion: String by extra("0.3.1-dev-RC")
allprojects {
group = "center.sciprog"
version = "0.2.2-dev-11"
version = "0.2.2-dev-12"
repositories {
mavenLocal()

View File

@ -9,9 +9,7 @@ val ktorVersion: String by rootProject.extra
kotlin {
jvmToolchain(11)
jvm {
withJava()
}
jvm()
sourceSets {
val jvmMain by getting {
dependencies {

View File

@ -8,12 +8,8 @@ plugins {
val ktorVersion: String by rootProject.extra
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "11"
}
withJava()
}
jvm()
jvmToolchain(11)
sourceSets {
val jvmMain by getting {
dependencies {

View File

@ -8,12 +8,8 @@ plugins {
val ktorVersion: String by rootProject.extra
kotlin {
jvm {
compilations.all {
kotlinOptions.jvmTarget = "11"
}
withJava()
}
jvm()
jvmToolchain(11)
sourceSets {
val jvmMain by getting {
dependencies {

View File

@ -25,7 +25,7 @@ public fun SchemeView(
state: XYViewScope,
features: FeatureGroup<XY>,
modifier: Modifier = Modifier.fillMaxSize(),
) = key(state, features) {
): Unit = key(state, features) {
with(state) {
//Can't do that inside canvas
val painterCache: Map<PainterFeature<XY>, Painter> =

View File

@ -18,7 +18,7 @@ import java.awt.Color as AWTColor
public class SvgDrawScope(
private val graphics: SVGGraphics2D,
size: Size,
val defaultStrokeWidth: Float = 1f,
private val defaultStrokeWidth: Float = 1f,
) : DrawScope {
override val layoutDirection: LayoutDirection
@ -459,7 +459,7 @@ public class SvgDrawScope(
}
}
fun drawText(
public fun drawText(
text: String,
x: Float,
y: Float,

View File

@ -18,18 +18,18 @@ import java.awt.Font.PLAIN
import kotlin.math.abs
class FeatureStateSnapshot<T : Any>(
val features: Map<String, Feature<T>>,
val painterCache: Map<PainterFeature<T>, Painter>,
public class FeatureStateSnapshot<T : Any>(
public val features: Map<String, Feature<T>>,
internal val painterCache: Map<PainterFeature<T>, Painter>,
)
@Composable
fun <T : Any> FeatureGroup<T>.snapshot(): FeatureStateSnapshot<T> = FeatureStateSnapshot(
public fun <T : Any> FeatureGroup<T>.snapshot(): FeatureStateSnapshot<T> = FeatureStateSnapshot(
featureMap,
features.filterIsInstance<PainterFeature<T>>().associateWith { it.getPainter() }
)
fun FeatureStateSnapshot<XY>.generateSvg(
public fun FeatureStateSnapshot<XY>.generateSvg(
viewPoint: ViewPoint<XY>,
width: Double,
height: Double,
@ -174,7 +174,7 @@ fun FeatureStateSnapshot<XY>.generateSvg(
return svgGraphics2D.getSVGElement(id)
}
fun FeatureStateSnapshot<XY>.exportToSvg(
public fun FeatureStateSnapshot<XY>.exportToSvg(
viewPoint: ViewPoint<XY>,
width: Double,
height: Double,

View File

@ -3,11 +3,11 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import space.kscience.kmath.geometry.*
import space.kscience.kmath.geometry.Euclidean2DSpace.distanceTo
import space.kscience.kmath.trajectory.Trajectory2D.*
import space.kscience.trajectory.Trajectory2D.*
import kotlin.math.acos
internal fun DubinsPose2D.getLeftCircle(radius: Double): Circle2D = getTangentCircles(radius).first

View File

@ -4,7 +4,7 @@
*/
@file:UseSerializers(Euclidean2DSpace.VectorSerializer::class)
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import space.kscience.kmath.geometry.*
import space.kscience.kmath.geometry.Euclidean2DSpace.distanceTo

View File

@ -4,7 +4,7 @@
*/
@file:UseSerializers(Euclidean2DSpace.VectorSerializer::class)
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import space.kscience.kmath.geometry.Euclidean2DSpace
import space.kscience.kmath.geometry.equalsFloat

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import space.kscience.kmath.geometry.Circle2D
import space.kscience.kmath.geometry.Euclidean2DSpace.vector

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import space.kscience.kmath.geometry.Circle2D
import space.kscience.kmath.geometry.Euclidean2DSpace

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory
package space.kscience.trajectory
import space.kscience.kmath.geometry.Euclidean2DSpace
import space.kscience.kmath.geometry.equalsFloat

View File

@ -3,14 +3,14 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory.segments
package space.kscience.trajectory.segments
import space.kscience.kmath.geometry.Circle2D
import space.kscience.kmath.geometry.Euclidean2DSpace
import space.kscience.kmath.geometry.circumference
import space.kscience.kmath.geometry.degrees
import space.kscience.kmath.trajectory.CircleTrajectory2D
import space.kscience.kmath.trajectory.Trajectory2D
import space.kscience.trajectory.CircleTrajectory2D
import space.kscience.trajectory.Trajectory2D
import kotlin.test.Test
import kotlin.test.assertEquals

View File

@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory.segments
package space.kscience.trajectory.segments
import space.kscience.kmath.geometry.Circle2D
import space.kscience.kmath.geometry.Euclidean2DSpace

View File

@ -3,11 +3,11 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package space.kscience.kmath.trajectory.segments
package space.kscience.trajectory.segments
import space.kscience.kmath.geometry.Euclidean2DSpace
import space.kscience.kmath.geometry.degrees
import space.kscience.kmath.trajectory.StraightTrajectory2D
import space.kscience.trajectory.StraightTrajectory2D
import kotlin.math.pow
import kotlin.math.sqrt
import kotlin.test.Test