From aca67f34d82021516c43503cef4d8d7ea6613e7d Mon Sep 17 00:00:00 2001 From: Mikael Vejdemo-Johansson Date: Tue, 20 Feb 2024 21:26:36 +0000 Subject: [PATCH] Changed some `protected` to `internal`. Not sure if this is the right encapsulation, but we can go over these later. --- src/commonMain/kotlin/org/appliedtopology/tda4j/Sets.kt | 4 ++-- src/commonMain/kotlin/org/appliedtopology/tda4j/Simplex.kt | 2 +- .../kotlin/org/appliedtopology/tda4j/SimplexStream.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commonMain/kotlin/org/appliedtopology/tda4j/Sets.kt b/src/commonMain/kotlin/org/appliedtopology/tda4j/Sets.kt index ed52af6e..a08bc029 100644 --- a/src/commonMain/kotlin/org/appliedtopology/tda4j/Sets.kt +++ b/src/commonMain/kotlin/org/appliedtopology/tda4j/Sets.kt @@ -2,7 +2,7 @@ package org.appliedtopology.tda4j open class ArrayMutableSortedSetBaseWith(capacity: Int = 8, val comparator: Comparator) { @Suppress("ktlint:standard:property-naming") - protected val _set: ArrayList = ArrayList(capacity) + internal val _set: ArrayList = ArrayList(capacity) fun add(element: T): Boolean { val index = _set.binarySearch(element, comparator) @@ -79,7 +79,7 @@ open class ArrayMutableSortedMapWith( val defaultValue: V? = null, ) : ArrayMutableSortedSetBaseWith(capacity, comparator), MutableMap { - protected val _values: ArrayList = ArrayList(capacity) + internal val _values: ArrayList = ArrayList(capacity) override fun containsKey(key: K): Boolean = _set.binarySearch(key, comparator) >= 0 diff --git a/src/commonMain/kotlin/org/appliedtopology/tda4j/Simplex.kt b/src/commonMain/kotlin/org/appliedtopology/tda4j/Simplex.kt index ddc4b903..f2df5170 100644 --- a/src/commonMain/kotlin/org/appliedtopology/tda4j/Simplex.kt +++ b/src/commonMain/kotlin/org/appliedtopology/tda4j/Simplex.kt @@ -4,7 +4,7 @@ import arrow.core.padZip open class AbstractSimplexWith(val vertexComparator: Comparator) : Set { @Suppress("ktlint:standard:property-naming") - protected val _simplex: MutableSortedSetWith = MutableSortedSetWith(comparator = vertexComparator) + internal val _simplex: MutableSortedSetWith = MutableSortedSetWith(comparator = vertexComparator) constructor(vertexComparator: Comparator, elements: HashSet) : this(vertexComparator) { _simplex.addAll(elements) diff --git a/src/commonMain/kotlin/org/appliedtopology/tda4j/SimplexStream.kt b/src/commonMain/kotlin/org/appliedtopology/tda4j/SimplexStream.kt index 2ac2b20b..7b2037fc 100644 --- a/src/commonMain/kotlin/org/appliedtopology/tda4j/SimplexStream.kt +++ b/src/commonMain/kotlin/org/appliedtopology/tda4j/SimplexStream.kt @@ -13,7 +13,7 @@ abstract class SimplexStream, FiltrationT : Compar open class ExplicitStream, FiltrationT : Comparable> : SimplexStream(), MutableMap, FiltrationT> { - protected val filtrationValues: MutableMap, FiltrationT> = HashMap() + internal val filtrationValues: MutableMap, FiltrationT> = HashMap() override fun filtrationValue(simplex: AbstractSimplex): FiltrationT? = filtrationValues[simplex]