Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev branch #66

Merged
merged 15 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Minor fixes
  • Loading branch information
IKupriyanov-HORIS committed Dec 18, 2019
commit 7754db094ba702a90db592f9933ecfb3b6996ce8
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import kotlin.test.assertEquals

class ParserTest {
private fun p(x: Double, y: Double): Vec<Generic> {
return jetbrains.datalore.base.typedGeometry.explicitVec(x, y)
return explicitVec(x, y)
}

private fun <T> optionalListOf (vararg elements: T): List<T>? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import jetbrains.datalore.base.event.MouseEventSource
import jetbrains.datalore.base.event.MouseEventSpec
import jetbrains.datalore.base.observable.event.EventHandler
import jetbrains.datalore.base.registration.Registration
import jetbrains.datalore.base.typedGeometry.MultiPolygon
import jetbrains.datalore.base.typedGeometry.Polygon
import jetbrains.datalore.base.typedGeometry.Ring
import jetbrains.datalore.base.typedGeometry.Vec
import jetbrains.datalore.base.typedGeometry.*
import jetbrains.datalore.base.unsupported.UNSUPPORTED
import jetbrains.datalore.base.values.Color
import jetbrains.datalore.vis.canvas.Context2d
Expand Down Expand Up @@ -49,7 +46,7 @@ class GrowingPathTest {
private lateinit var myGrowingPathEffectComponent: GrowingPathEffectComponent

private fun p(x: Double, y: Double): Vec<Client> {
return jetbrains.datalore.base.typedGeometry.explicitVec<Client>(x, y)
return explicitVec<Client>(x, y)
}

private fun index(i: Int): EffectState {
Expand Down Expand Up @@ -154,7 +151,7 @@ class GrowingPathTest {
.addComponent(
GrowingPathEffectComponent().apply {
endIndex = 3
interpolatedPoint = jetbrains.datalore.base.typedGeometry.explicitVec(3.5, 3.5)
interpolatedPoint = explicitVec(3.5, 3.5)
}

)
Expand Down Expand Up @@ -203,9 +200,9 @@ class GrowingPathTest {
assertEquals(
listOf(
index(0),
interpolated(0, jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 75.0)),
interpolated(1, jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 150.0)),
interpolated(1, jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 225.0)),
interpolated(0, explicitVec(0.0, 75.0)),
interpolated(1, explicitVec(0.0, 150.0)),
interpolated(1, explicitVec(0.0, 225.0)),
index(2)
),
myEffectState
Expand All @@ -219,8 +216,8 @@ class GrowingPathTest {
assertEquals(
listOf(
index(0),
interpolated(0, jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 100.0)),
interpolated(0, jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 200.0)),
interpolated(0, explicitVec(0.0, 100.0)),
interpolated(0, explicitVec(0.0, 200.0)),
index(1)
),
myEffectState
Expand All @@ -232,7 +229,7 @@ class GrowingPathTest {

private fun <TypeT> Vec<TypeT>.roundDecimals(places: Int): Vec<TypeT> {
return (10.ipow(places)).let {
jetbrains.datalore.base.typedGeometry.explicitVec(
explicitVec(
x.roundDecimals(it),
y.roundDecimals(it)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import kotlin.test.assertEquals
class MultiPolygonTransformTest {

private fun <TypeT> p(x: Double, y: Double): Vec<TypeT> {
return jetbrains.datalore.base.typedGeometry.explicitVec(x, y)
return explicitVec(x, y)
}

private fun <TypeT> multiPolygon(vararg polygons: Polygon<TypeT>): MultiPolygon<TypeT> {
Expand Down Expand Up @@ -68,7 +68,7 @@ class MultiPolygonTransformTest {
)
)
)
) { it + jetbrains.datalore.base.typedGeometry.explicitVec(1.0, 1.0) }
) { it + explicitVec(1.0, 1.0) }

var i = 0
while (transform.alive()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import java.util.*

class DonorTileCalculatorTest {
private val myCellRect = Rect<Client>(
jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 0.0),
jetbrains.datalore.base.typedGeometry.explicitVec(256.0, 256.0)
explicitVec(0.0, 0.0),
explicitVec(256.0, 256.0)
)
private val myContext2d = Mockito.mock(Context2d::class.java)
private val mySnapshotMap = HashMap<String, Tile>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@ internal object ConverterDataHelper {
val MAP_PROJECTION =
createMapProjection(
ProjectionType.MERCATOR,
Rect(ZERO_WORLD_POINT, jetbrains.datalore.base.typedGeometry.explicitVec(TILE_PIXEL_SIZE, TILE_PIXEL_SIZE))
Rect(ZERO_WORLD_POINT, explicitVec(TILE_PIXEL_SIZE, TILE_PIXEL_SIZE))
)

val GENERIC_POINTS: List<Vec<LonLat>> = listOf(
jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 5.0),
jetbrains.datalore.base.typedGeometry.explicitVec(5.0, 5.0)
explicitVec(0.0, 5.0),
explicitVec(5.0, 5.0)
)

val PATH = multiPolygon<LonLat>(
polygon(
ring(
jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 5.0),
jetbrains.datalore.base.typedGeometry.explicitVec(1.0, 5.003032951),
jetbrains.datalore.base.typedGeometry.explicitVec(2.0, 5.004549647),
jetbrains.datalore.base.typedGeometry.explicitVec(3.0, 5.004549647),
jetbrains.datalore.base.typedGeometry.explicitVec(4.0, 5.003032951),
jetbrains.datalore.base.typedGeometry.explicitVec(5.0, 5.0)
explicitVec(0.0, 5.0),
explicitVec(1.0, 5.003032951),
explicitVec(2.0, 5.004549647),
explicitVec(3.0, 5.004549647),
explicitVec(4.0, 5.003032951),
explicitVec(5.0, 5.0)
)
)
)

val FIRST_RING = Ring<LonLat>(
listOf(
jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 5.0),
jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 1.0),
jetbrains.datalore.base.typedGeometry.explicitVec(0.0, 5.0)
explicitVec(0.0, 5.0),
explicitVec(0.0, 1.0),
explicitVec(0.0, 5.0)
)
)

val SECOND_RING = ring<LonLat>(
jetbrains.datalore.base.typedGeometry.explicitVec(5.0, 5.0),
jetbrains.datalore.base.typedGeometry.explicitVec(5.0, 1.0),
jetbrains.datalore.base.typedGeometry.explicitVec(5.0, 5.0)
explicitVec(5.0, 5.0),
explicitVec(5.0, 1.0),
explicitVec(5.0, 5.0)
)

val MULTIPOLYGON = multiPolygon(
Expand Down