Merge pull request #216 from mipt-npm/feature/ring-operations
Deprecating div methods
This commit is contained in:
commit
f5f9bbed53
5
.gitignore
vendored
5
.gitignore
vendored
@ -2,9 +2,14 @@
|
|||||||
build/
|
build/
|
||||||
out/
|
out/
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
!gradle-wrapper.jar
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
# Cache of project
|
# Cache of project
|
||||||
.gradletasknamecache
|
.gradletasknamecache
|
||||||
|
|
||||||
|
# Generated by javac -h and runtime
|
||||||
|
*.class
|
||||||
|
*.log
|
||||||
|
@ -175,6 +175,7 @@ public interface SpaceOperations<T> : Algebra<T> {
|
|||||||
* @param k the divisor.
|
* @param k the divisor.
|
||||||
* @return the quotient.
|
* @return the quotient.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated("Dividing not allowed in a Ring")
|
||||||
public operator fun T.div(k: Number): T = multiply(this, 1.0 / k.toDouble())
|
public operator fun T.div(k: Number): T = multiply(this, 1.0 / k.toDouble())
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -96,6 +96,7 @@ public interface Nd4jArraySpace<T, S : Space<T>> : NDSpace<T, S>, Nd4jArrayAlgeb
|
|||||||
return a.ndArray.mul(k).wrap()
|
return a.ndArray.mul(k).wrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated("Avoid using this method, underlying array get casted to Doubles")
|
||||||
public override operator fun NDStructure<T>.div(k: Number): Nd4jArrayStructure<T> {
|
public override operator fun NDStructure<T>.div(k: Number): Nd4jArrayStructure<T> {
|
||||||
return ndArray.div(k).wrap()
|
return ndArray.div(k).wrap()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user