01: /*
02: * Created on Jul 12, 2004
03: *
04: */
05: package org.jmatlab.linalg;
06:
07: import java.math.BigDecimal;
08: import java.util.Hashtable;
09: import java.util.Map;
10:
11: import org.jmatlab.semantic.Symbol;
12:
13: /**
14: * @author Ali
15: *
16: */
17: public class DefaultLinearAlgebraFactory extends
18: AbstractLinearAlgebraFactory {
19:
20: public IComplex createComplex() {
21: return new DefaultComplexImpl(0, 0);
22: }
23:
24: public IComplex createComplex(double d) {
25: return new DefaultComplexImpl(d);
26: }
27:
28: public IComplex createComplex(double real, double imag) {
29: return new DefaultComplexImpl(real, imag);
30: }
31:
32: public IComplex createComplex(IComplex c) {
33: return new DefaultComplexImpl(c);
34: }
35:
36: public IMatrix createMatrix(IComplex[][] c) {
37: return new DefaultMatrixImpl(c);
38: }
39:
40: public IMatrix createMatrix(IMatrix m) {
41: return new DefaultMatrixImpl(m);
42: }
43:
44: public IMatrix createMatrix(int m, int n) {
45: return new DefaultMatrixImpl(m, n);
46: }
47:
48: public IMatrix createMatrix(String[][] str) {
49: return new DefaultMatrixImpl(str);
50: }
51:
52: public IMatrix createMatrix(Hashtable hash, int m, int n) {
53: return new DefaultMatrixImpl(hash, m, n);
54: }
55:
56: public IMatrix createMatrix(BigDecimal[][] b) {
57: return new DefaultMatrixImpl(b);
58: }
59:
60: public IStruct createStruct(Map map) {
61: return new DefaultStructImpl(map);
62: }
63:
64: public IStruct createStruct(int i, Map map) {
65: return new DefaultStructImpl(i, map);
66: }
67:
68: public IStruct createStruct(int i, int j, Map map) {
69: return new DefaultStructImpl(i, j, map);
70: }
71:
72: public ICell createCell() {
73: return new DefaultCellImpl();
74: }
75:
76: public ICell createCell(Symbol symbol) {
77: return new DefaultCellImpl(symbol);
78: }
79:
80: public IMatrix getEmptyMatrix() {
81: return DefaultMatrixImpl.EMPTY_MATRIX;
82: }
83: }
|