I am currently writing a program using matlab in scala (via the matlabcontrol API). I want to achieve a programming language independent solution, so I can use some algorithms in Scala and some in Matlab. The program works already (as far as I tested it) but I am also interested in abstraction so that I can exchange modules using scilab or other languages.
To understand the problem in detail I show you the ImageReader class:
trait ImageReader {
def readImage(path:String):Any
}
object Matlab_ImageReader extends ImageReader {
def readImage(path:String):Any = {
proxy.eval("image = imread('"+ path + "');"
return "image"
}
}
The idea is, that I want to treat the return value as a reference to the language object I use. I will use Scala only as a controler, working with references and thereby implementing a partwise object-oriented solution for a complicated piece of matlabcode.
Now I also want to exchange parts of the code and give other developers a possible entrypoint for implementing their own solution for example in Scala. The problems are:
I am sorry for the vague question, but I do not really know how to explain my exact problem :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.