Compare commits
2 Commits
df800f05f0
...
2d46a0ad98
Author | SHA1 | Date | |
---|---|---|---|
2d46a0ad98 | |||
29a0fb743c |
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Add alpha attribute comprehension for all standard features.
|
- Add alpha attribute comprehension for all standard features.
|
||||||
|
- Package name for SerializeableAttribute
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ val kmathVersion: String by extra("0.4.0")
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "space.kscience"
|
group = "space.kscience"
|
||||||
version = "0.4.0-dev"
|
version = "0.4.0-dev-2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
@ -18,8 +18,8 @@ import androidx.compose.ui.unit.Dp
|
|||||||
import androidx.compose.ui.unit.DpSize
|
import androidx.compose.ui.unit.DpSize
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import org.jetbrains.skia.Font
|
import org.jetbrains.skia.Font
|
||||||
import space.kscience.NameAttribute
|
|
||||||
import space.kscience.attributes.Attributes
|
import space.kscience.attributes.Attributes
|
||||||
|
import space.kscience.attributes.NameAttribute
|
||||||
import space.kscience.kmath.geometry.Angle
|
import space.kscience.kmath.geometry.Angle
|
||||||
import space.kscience.kmath.nd.Structure2D
|
import space.kscience.kmath.nd.Structure2D
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ import kotlinx.serialization.modules.SerializersModule
|
|||||||
import kotlinx.serialization.modules.contextual
|
import kotlinx.serialization.modules.contextual
|
||||||
import kotlinx.serialization.protobuf.ProtoBuf
|
import kotlinx.serialization.protobuf.ProtoBuf
|
||||||
import kotlinx.serialization.serializer
|
import kotlinx.serialization.serializer
|
||||||
import space.kscience.AttributesSerializer
|
|
||||||
import space.kscience.NameAttribute
|
|
||||||
import space.kscience.SerializableAttribute
|
|
||||||
import space.kscience.attributes.Attributes
|
import space.kscience.attributes.Attributes
|
||||||
|
import space.kscience.attributes.AttributesSerializer
|
||||||
|
import space.kscience.attributes.NameAttribute
|
||||||
|
import space.kscience.attributes.SerializableAttribute
|
||||||
import kotlin.test.Ignore
|
import kotlin.test.Ignore
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
@ -2,6 +2,6 @@ package space.kscience.maps.geojson
|
|||||||
|
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.serializer
|
import kotlinx.serialization.serializer
|
||||||
import space.kscience.SerializableAttribute
|
import space.kscience.attributes.SerializableAttribute
|
||||||
|
|
||||||
public object GeoJsonPropertiesAttribute : SerializableAttribute<JsonObject>("properties", serializer())
|
public object GeoJsonPropertiesAttribute : SerializableAttribute<JsonObject>("properties", serializer())
|
@ -4,7 +4,7 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import kotlinx.serialization.json.contentOrNull
|
import kotlinx.serialization.json.contentOrNull
|
||||||
import kotlinx.serialization.json.intOrNull
|
import kotlinx.serialization.json.intOrNull
|
||||||
import kotlinx.serialization.json.jsonPrimitive
|
import kotlinx.serialization.json.jsonPrimitive
|
||||||
import space.kscience.NameAttribute
|
import space.kscience.attributes.NameAttribute
|
||||||
import space.kscience.maps.coordinates.Gmc
|
import space.kscience.maps.coordinates.Gmc
|
||||||
import space.kscience.maps.features.*
|
import space.kscience.maps.features.*
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@file:Suppress("UNCHECKED_CAST")
|
@file:Suppress("UNCHECKED_CAST")
|
||||||
|
|
||||||
package space.kscience
|
package space.kscience.attributes
|
||||||
|
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.builtins.serializer
|
import kotlinx.serialization.builtins.serializer
|
||||||
@ -8,8 +8,6 @@ import kotlinx.serialization.descriptors.SerialDescriptor
|
|||||||
import kotlinx.serialization.encoding.Decoder
|
import kotlinx.serialization.encoding.Decoder
|
||||||
import kotlinx.serialization.encoding.Encoder
|
import kotlinx.serialization.encoding.Encoder
|
||||||
import kotlinx.serialization.json.*
|
import kotlinx.serialization.json.*
|
||||||
import space.kscience.attributes.Attribute
|
|
||||||
import space.kscience.attributes.Attributes
|
|
||||||
|
|
||||||
public class AttributesSerializer(
|
public class AttributesSerializer(
|
||||||
private val serializableAttributes: Set<SerializableAttribute<*>>,
|
private val serializableAttributes: Set<SerializableAttribute<*>>,
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
package space.kscience.trajectory
|
package space.kscience.trajectory
|
||||||
|
|
||||||
import space.kscience.intersectsTrajectory
|
|
||||||
import space.kscience.kmath.geometry.Angle
|
import space.kscience.kmath.geometry.Angle
|
||||||
import space.kscience.kmath.geometry.Polygon
|
import space.kscience.kmath.geometry.Polygon
|
||||||
import space.kscience.kmath.geometry.Vector2D
|
import space.kscience.kmath.geometry.Vector2D
|
||||||
@ -13,7 +12,6 @@ import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
|||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
import space.kscience.kmath.misc.zipWithNextCircular
|
import space.kscience.kmath.misc.zipWithNextCircular
|
||||||
import space.kscience.kmath.structures.Float64
|
import space.kscience.kmath.structures.Float64
|
||||||
import space.kscience.polygon
|
|
||||||
|
|
||||||
|
|
||||||
public interface Obstacle {
|
public interface Obstacle {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package space.kscience.trajectory
|
package space.kscience.trajectory
|
||||||
|
|
||||||
import space.kscience.containsPoint
|
|
||||||
import space.kscience.intersects
|
|
||||||
import space.kscience.intersectsOrInside
|
|
||||||
import space.kscience.kmath.geometry.Angle
|
import space.kscience.kmath.geometry.Angle
|
||||||
import space.kscience.kmath.geometry.Polygon
|
import space.kscience.kmath.geometry.Polygon
|
||||||
import space.kscience.kmath.geometry.Vector2D
|
import space.kscience.kmath.geometry.Vector2D
|
||||||
|
@ -9,14 +9,11 @@ package space.kscience.trajectory
|
|||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.UseSerializers
|
import kotlinx.serialization.UseSerializers
|
||||||
import space.kscience.intersects
|
|
||||||
import space.kscience.intersectsOrInside
|
|
||||||
import space.kscience.kmath.geometry.*
|
import space.kscience.kmath.geometry.*
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D.distanceTo
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D.distanceTo
|
||||||
import space.kscience.kmath.structures.Float64
|
import space.kscience.kmath.structures.Float64
|
||||||
import space.kscience.tangent
|
|
||||||
import kotlin.math.atan2
|
import kotlin.math.atan2
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -35,17 +32,11 @@ public sealed interface Trajectory2D {
|
|||||||
|
|
||||||
public sealed interface Direction : Type
|
public sealed interface Direction : Type
|
||||||
|
|
||||||
public object R : Direction {
|
public data object R : Direction
|
||||||
override fun toString(): String = "R"
|
|
||||||
}
|
|
||||||
|
|
||||||
public object S : Type {
|
public data object S : Type
|
||||||
override fun toString(): String = "S"
|
|
||||||
}
|
|
||||||
|
|
||||||
public object L : Direction {
|
public data object L : Direction
|
||||||
override fun toString(): String = "L"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package space.kscience.trajectory
|
package space.kscience.trajectory
|
||||||
|
|
||||||
import space.kscience.containsPoint
|
|
||||||
import space.kscience.kmath.geometry.*
|
import space.kscience.kmath.geometry.*
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package space.kscience
|
package space.kscience.trajectory
|
||||||
|
|
||||||
import space.kscience.kmath.geometry.*
|
import space.kscience.kmath.geometry.*
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
import space.kscience.kmath.structures.Float64
|
import space.kscience.kmath.structures.Float64
|
||||||
import space.kscience.trajectory.*
|
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
import kotlin.math.sign
|
import kotlin.math.sign
|
@ -1,4 +1,4 @@
|
|||||||
package space.kscience
|
package space.kscience.trajectory
|
||||||
|
|
||||||
import space.kscience.kmath.geometry.LineSegment2D
|
import space.kscience.kmath.geometry.LineSegment2D
|
||||||
import space.kscience.kmath.geometry.Polygon
|
import space.kscience.kmath.geometry.Polygon
|
||||||
@ -7,7 +7,6 @@ import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
|||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
import space.kscience.kmath.misc.zipWithNextCircular
|
import space.kscience.kmath.misc.zipWithNextCircular
|
||||||
import space.kscience.kmath.structures.Float64
|
import space.kscience.kmath.structures.Float64
|
||||||
import space.kscience.trajectory.Trajectory2D
|
|
||||||
|
|
||||||
public fun Float64Space2D.polygon(points: List<Vector2D<Double>>): Polygon<Vector2D<Float64>> =
|
public fun Float64Space2D.polygon(points: List<Vector2D<Double>>): Polygon<Vector2D<Float64>> =
|
||||||
object : Polygon<Vector2D<Float64>> {
|
object : Polygon<Vector2D<Float64>> {
|
@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
package space.kscience.kmath.geometry
|
package space.kscience.kmath.geometry
|
||||||
|
|
||||||
import space.kscience.circle
|
|
||||||
import space.kscience.containsPoint
|
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.circumference
|
import space.kscience.kmath.geometry.euclidean2d.circumference
|
||||||
import space.kscience.trajectory.CircleTrajectory2D
|
import space.kscience.trajectory.CircleTrajectory2D
|
||||||
import space.kscience.trajectory.Trajectory2D
|
import space.kscience.trajectory.Trajectory2D
|
||||||
|
import space.kscience.trajectory.circle
|
||||||
|
import space.kscience.trajectory.containsPoint
|
||||||
import kotlin.math.PI
|
import kotlin.math.PI
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
package space.kscience.kmath.geometry
|
package space.kscience.kmath.geometry
|
||||||
|
|
||||||
import space.kscience.circle
|
|
||||||
import space.kscience.intersects
|
|
||||||
import space.kscience.intersectsOrInside
|
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
import space.kscience.kmath.geometry.euclidean2d.Circle2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
|
||||||
import space.kscience.kmath.geometry.euclidean2d.circumference
|
import space.kscience.kmath.geometry.euclidean2d.circumference
|
||||||
import space.kscience.kmath.structures.Float64
|
import space.kscience.kmath.structures.Float64
|
||||||
import space.kscience.segment
|
import space.kscience.trajectory.circle
|
||||||
|
import space.kscience.trajectory.intersects
|
||||||
|
import space.kscience.trajectory.intersectsOrInside
|
||||||
|
import space.kscience.trajectory.segment
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
import kotlin.math.sqrt
|
import kotlin.math.sqrt
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
|
Loading…
Reference in New Issue
Block a user