Compare commits

..

No commits in common. "2d46a0ad9840eeca483ef213ac9fa590dd396e53" and "df800f05f0a1499cfa3ff2aedb04a0bc37d09daf" have entirely different histories.

15 changed files with 38 additions and 20 deletions

View File

@ -14,7 +14,6 @@
### Fixed
- Add alpha attribute comprehension for all standard features.
- Package name for SerializeableAttribute
### Security

View File

@ -9,7 +9,7 @@ val kmathVersion: String by extra("0.4.0")
allprojects {
group = "space.kscience"
version = "0.4.0-dev-2"
version = "0.4.0-dev"
repositories {
mavenLocal()

View File

@ -18,8 +18,8 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import org.jetbrains.skia.Font
import space.kscience.NameAttribute
import space.kscience.attributes.Attributes
import space.kscience.attributes.NameAttribute
import space.kscience.kmath.geometry.Angle
import space.kscience.kmath.nd.Structure2D

View File

@ -8,10 +8,10 @@ import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.modules.contextual
import kotlinx.serialization.protobuf.ProtoBuf
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.AttributesSerializer
import space.kscience.attributes.NameAttribute
import space.kscience.attributes.SerializableAttribute
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals

View File

@ -2,6 +2,6 @@ package space.kscience.maps.geojson
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.serializer
import space.kscience.attributes.SerializableAttribute
import space.kscience.SerializableAttribute
public object GeoJsonPropertiesAttribute : SerializableAttribute<JsonObject>("properties", serializer())

View File

@ -4,7 +4,7 @@ import androidx.compose.ui.graphics.Color
import kotlinx.serialization.json.contentOrNull
import kotlinx.serialization.json.intOrNull
import kotlinx.serialization.json.jsonPrimitive
import space.kscience.attributes.NameAttribute
import space.kscience.NameAttribute
import space.kscience.maps.coordinates.Gmc
import space.kscience.maps.features.*

View File

@ -1,6 +1,6 @@
@file:Suppress("UNCHECKED_CAST")
package space.kscience.attributes
package space.kscience
import kotlinx.serialization.KSerializer
import kotlinx.serialization.builtins.serializer
@ -8,6 +8,8 @@ import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
import kotlinx.serialization.json.*
import space.kscience.attributes.Attribute
import space.kscience.attributes.Attributes
public class AttributesSerializer(
private val serializableAttributes: Set<SerializableAttribute<*>>,

View File

@ -1,9 +1,10 @@
package space.kscience.trajectory
package space.kscience
import space.kscience.kmath.geometry.*
import space.kscience.kmath.geometry.euclidean2d.Circle2D
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
import space.kscience.kmath.structures.Float64
import space.kscience.trajectory.*
import kotlin.math.abs
import kotlin.math.pow
import kotlin.math.sign

View File

@ -1,4 +1,4 @@
package space.kscience.trajectory
package space.kscience
import space.kscience.kmath.geometry.LineSegment2D
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.misc.zipWithNextCircular
import space.kscience.kmath.structures.Float64
import space.kscience.trajectory.Trajectory2D
public fun Float64Space2D.polygon(points: List<Vector2D<Double>>): Polygon<Vector2D<Float64>> =
object : Polygon<Vector2D<Float64>> {

View File

@ -5,6 +5,7 @@
package space.kscience.trajectory
import space.kscience.intersectsTrajectory
import space.kscience.kmath.geometry.Angle
import space.kscience.kmath.geometry.Polygon
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.misc.zipWithNextCircular
import space.kscience.kmath.structures.Float64
import space.kscience.polygon
public interface Obstacle {

View File

@ -1,5 +1,8 @@
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.Polygon
import space.kscience.kmath.geometry.Vector2D

View File

@ -9,11 +9,14 @@ package space.kscience.trajectory
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
import space.kscience.intersects
import space.kscience.intersectsOrInside
import space.kscience.kmath.geometry.*
import space.kscience.kmath.geometry.euclidean2d.Circle2D
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D.distanceTo
import space.kscience.kmath.structures.Float64
import space.kscience.tangent
import kotlin.math.atan2
@Serializable
@ -32,11 +35,17 @@ public sealed interface Trajectory2D {
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"
}
}

View File

@ -1,5 +1,6 @@
package space.kscience.trajectory
import space.kscience.containsPoint
import space.kscience.kmath.geometry.*
import space.kscience.kmath.geometry.euclidean2d.Circle2D
import space.kscience.kmath.geometry.euclidean2d.Float64Space2D

View File

@ -5,13 +5,13 @@
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.Float64Space2D
import space.kscience.kmath.geometry.euclidean2d.circumference
import space.kscience.trajectory.CircleTrajectory2D
import space.kscience.trajectory.Trajectory2D
import space.kscience.trajectory.circle
import space.kscience.trajectory.containsPoint
import kotlin.math.PI
import kotlin.test.Test
import kotlin.test.assertEquals

View File

@ -5,14 +5,14 @@
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.Float64Space2D
import space.kscience.kmath.geometry.euclidean2d.circumference
import space.kscience.kmath.structures.Float64
import space.kscience.trajectory.circle
import space.kscience.trajectory.intersects
import space.kscience.trajectory.intersectsOrInside
import space.kscience.trajectory.segment
import space.kscience.segment
import kotlin.math.pow
import kotlin.math.sqrt
import kotlin.test.Test