Compare commits
No commits in common. "2d46a0ad9840eeca483ef213ac9fa590dd396e53" and "df800f05f0a1499cfa3ff2aedb04a0bc37d09daf" have entirely different histories.
2d46a0ad98
...
df800f05f0
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
### 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-2"
|
version = "0.4.0-dev"
|
||||||
|
|
||||||
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.attributes.SerializableAttribute
|
import space.kscience.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.attributes.NameAttribute
|
import space.kscience.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.attributes
|
package space.kscience
|
||||||
|
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.builtins.serializer
|
import kotlinx.serialization.builtins.serializer
|
||||||
@ -8,6 +8,8 @@ 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<*>>,
|
@ -1,9 +1,10 @@
|
|||||||
package space.kscience.trajectory
|
package space.kscience
|
||||||
|
|
||||||
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.trajectory
|
package space.kscience
|
||||||
|
|
||||||
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,6 +7,7 @@ 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,6 +5,7 @@
|
|||||||
|
|
||||||
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
|
||||||
@ -12,6 +13,7 @@ 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,5 +1,8 @@
|
|||||||
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,11 +9,14 @@ 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
|
||||||
@ -32,11 +35,17 @@ public sealed interface Trajectory2D {
|
|||||||
|
|
||||||
public sealed interface Direction : Type
|
public sealed interface Direction : Type
|
||||||
|
|
||||||
public data object R : Direction
|
public object R : Direction {
|
||||||
|
override fun toString(): String = "R"
|
||||||
|
}
|
||||||
|
|
||||||
public data object S : Type
|
public object S : Type {
|
||||||
|
override fun toString(): String = "S"
|
||||||
|
}
|
||||||
|
|
||||||
public data object L : Direction
|
public object L : Direction {
|
||||||
|
override fun toString(): String = "L"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
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
|
||||||
|
@ -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.trajectory.circle
|
import space.kscience.segment
|
||||||
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