Hard code specific imports in codegen

This commit is contained in:
Iaroslav Postovalov 2021-05-18 18:02:13 +07:00
parent e7235e2a9c
commit b4dd4380c0

View File

@ -369,19 +369,29 @@ fun ejmlCodegen(outputFile: String): Unit = File(outputFile).run {
it.appendLine() it.appendLine()
it.appendLine("package space.kscience.kmath.ejml") it.appendLine("package space.kscience.kmath.ejml")
it.appendLine() it.appendLine()
it.appendLine("import org.ejml.data.*") it.appendLine("""import org.ejml.data.*
it.appendLine("import space.kscience.kmath.linear.*") import org.ejml.dense.row.CommonOps_DDRM
it.appendLine("import space.kscience.kmath.operations.*") import org.ejml.dense.row.CommonOps_FDRM
it.appendLine("import space.kscience.kmath.structures.*") import org.ejml.dense.row.factory.DecompositionFactory_DDRM
it.appendLine("import space.kscience.kmath.misc.*") import org.ejml.dense.row.factory.DecompositionFactory_FDRM
it.appendLine("import kotlin.reflect.*") import org.ejml.sparse.FillReducing
it.appendLine("import org.ejml.dense.row.*") import org.ejml.sparse.csc.CommonOps_DSCC
it.appendLine("import org.ejml.dense.row.factory.*") import org.ejml.sparse.csc.CommonOps_FSCC
it.appendLine("import org.ejml.sparse.*") import org.ejml.sparse.csc.factory.DecompositionFactory_DSCC
it.appendLine("import org.ejml.sparse.csc.*") import org.ejml.sparse.csc.factory.DecompositionFactory_FSCC
it.appendLine("import org.ejml.sparse.csc.factory.*") import org.ejml.sparse.csc.factory.LinearSolverFactory_DSCC
it.appendLine("import space.kscience.kmath.nd.*") import org.ejml.sparse.csc.factory.LinearSolverFactory_FSCC
it.appendLine("import space.kscience.kmath.linear.Matrix") import space.kscience.kmath.linear.*
import space.kscience.kmath.linear.Matrix
import space.kscience.kmath.misc.UnstableKMathAPI
import space.kscience.kmath.nd.StructureFeature
import space.kscience.kmath.operations.DoubleField
import space.kscience.kmath.operations.FloatField
import space.kscience.kmath.operations.invoke
import space.kscience.kmath.structures.DoubleBuffer
import space.kscience.kmath.structures.FloatBuffer
import kotlin.reflect.KClass
import kotlin.reflect.cast""")
it.appendLine() it.appendLine()
it.appendEjmlVector("Double", "DMatrix") it.appendEjmlVector("Double", "DMatrix")
it.appendEjmlVector("Float", "FMatrix") it.appendEjmlVector("Float", "FMatrix")