66 lines
1.3 KiB
Plaintext
66 lines
1.3 KiB
Plaintext
@startuml
|
|
package "function.base" {
|
|
interface ISin {
|
|
+sin(x: Double, eps: Double = 1e-10): Double
|
|
}
|
|
interface ILn {
|
|
+ln(x: Double, eps: Double = 1e-10): Double
|
|
}
|
|
class SinTaylor implements ISin
|
|
class LnTaylor implements ILn
|
|
}
|
|
|
|
package "function.trigonometric" {
|
|
class Cos implements ICos
|
|
class Csc implements ICsc
|
|
class Sec implements ISec
|
|
class Cot implements ICot
|
|
Cos --> ISin
|
|
Csc --> ISin
|
|
Sec --> ISin
|
|
Cot --> ISin
|
|
}
|
|
|
|
package "function.logarithmic" {
|
|
class Log implements ILog
|
|
Log --> ILn
|
|
}
|
|
|
|
package "function.stubs" {
|
|
class SinStub implements ISin
|
|
class LnStub implements ILn
|
|
class CosStub implements ICos
|
|
class CscStub implements ICsc
|
|
class SecStub implements ISec
|
|
class CotStub implements ICot
|
|
class LogStub implements ILog
|
|
}
|
|
|
|
class FunctionSystem {
|
|
-sinImpl: ISin
|
|
-lnImpl: ILn
|
|
-cosImpl: ICos
|
|
-cscImpl: ICsc
|
|
-secImpl: ISec
|
|
-cotImpl: ICot
|
|
-logImpl: ILog
|
|
+compute(x: Double, eps: Double = 1e-10): Double
|
|
}
|
|
|
|
FunctionSystem --> ISin
|
|
FunctionSystem --> ILn
|
|
FunctionSystem --> ICos
|
|
FunctionSystem --> ICsc
|
|
FunctionSystem --> ISec
|
|
FunctionSystem --> ICot
|
|
FunctionSystem --> ILog
|
|
|
|
package "util" {
|
|
class CsvWriter {
|
|
+writeToCsv(filename: String, data: List<Pair<Double,Double>>, label: String)
|
|
}
|
|
}
|
|
|
|
Main --> FunctionSystem
|
|
Main --> CsvWriter
|
|
@enduml |