Deprecating div methods #216
5
.gitignore
vendored
5
.gitignore
vendored
@ -2,9 +2,14 @@
|
||||
build/
|
||||
out/
|
||||
.idea/
|
||||
.vscode/
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# Generated by javac -h and runtime
|
||||
*.class
|
||||
*.log
|
||||
|
@ -175,6 +175,7 @@ public interface SpaceOperations<T> : Algebra<T> {
|
||||
* @param k the divisor.
|
||||
* @return the quotient.
|
||||
*/
|
||||
@Deprecated("Dividing not allowed in a Ring")
|
||||
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()
|
||||
}
|
||||
|
||||
@Deprecated("Avoid using this method, underlying array get casted to Doubles")
|
||||
public override operator fun NDStructure<T>.div(k: Number): Nd4jArrayStructure<T> {
|
||||
return ndArray.div(k).wrap()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user