diff --git a/test/atoms.jl b/test/atoms.jl deleted file mode 100644 index c54f25cb..00000000 --- a/test/atoms.jl +++ /dev/null @@ -1,48 +0,0 @@ -using RowEchelon -n = 2 -m = 6 -M = - [ - 1.0000 1.5868 2.2477 2.7603 3.6690 5.2387 - 1.5868 2.7603 3.6690 5.1073 6.5115 8.8245 - 2.2477 3.6690 5.2387 6.5115 8.8245 12.7072 - 2.7603 5.1073 6.5115 9.8013 12.1965 15.9960 - 3.6690 6.5115 8.8245 12.1965 15.9960 22.1084 - 5.2387 8.8245 12.7072 15.9960 22.1084 32.1036 - ] + 1.44e-5 * eye(m) - -#d, U = eigs(M, nev=3) -#d, U = eigs(M) -#function getU(U) -# V = [U[:,1]*sqrt(d[1]) U[:,2]*sqrt(d[2]) U[:,3]*sqrt(d[3])] -# Matrix{Int}(round.(rref(V')')) -#end -r = rank(M, 1e-4) -V = chol(M)[1:r, :] -U = rref(V)' -Ns = [ - [ - 0 1 0 - -2 3 0 - -4 2 2 - ], - [ - 0 0 1 - -4 2 2 - -6 0 5 - ], -] -#N = 0.6906Ns[1] + 0.3091Ns[2] -for i in 1:10 - λ = rand() - N = λ * Ns[1] + (1 - λ) * Ns[2] - Z = schurfact(N)[:Z] - x = [Vector{Float64}(n) for j in 1:r] - for j in 1:r - qj = Z[:, j] - for i in 1:n - x[j][i] = dot(qj, Ns[i] * qj) - end - end - @show x -end diff --git a/test/algebra.jl b/test/commutative/algebra.jl similarity index 100% rename from test/algebra.jl rename to test/commutative/algebra.jl diff --git a/test/chain_rules.jl b/test/commutative/chain_rules.jl similarity index 100% rename from test/chain_rules.jl rename to test/commutative/chain_rules.jl diff --git a/test/comparison.jl b/test/commutative/comparison.jl similarity index 100% rename from test/comparison.jl rename to test/commutative/comparison.jl diff --git a/test/complex.jl b/test/commutative/complex.jl similarity index 100% rename from test/complex.jl rename to test/commutative/complex.jl diff --git a/test/det.jl b/test/commutative/det.jl similarity index 100% rename from test/det.jl rename to test/commutative/det.jl diff --git a/test/differentiation.jl b/test/commutative/differentiation.jl similarity index 100% rename from test/differentiation.jl rename to test/commutative/differentiation.jl diff --git a/test/division.jl b/test/commutative/division.jl similarity index 100% rename from test/division.jl rename to test/commutative/division.jl diff --git a/test/example1.jl b/test/commutative/example1.jl similarity index 100% rename from test/example1.jl rename to test/commutative/example1.jl diff --git a/test/example2.jl b/test/commutative/example2.jl similarity index 100% rename from test/example2.jl rename to test/commutative/example2.jl diff --git a/test/gcd.jl b/test/commutative/gcd.jl similarity index 100% rename from test/gcd.jl rename to test/commutative/gcd.jl diff --git a/test/hash.jl b/test/commutative/hash.jl similarity index 100% rename from test/hash.jl rename to test/commutative/hash.jl diff --git a/test/independent.jl b/test/commutative/independent.jl similarity index 100% rename from test/independent.jl rename to test/commutative/independent.jl diff --git a/test/monomial.jl b/test/commutative/monomial.jl similarity index 100% rename from test/monomial.jl rename to test/commutative/monomial.jl diff --git a/test/monomial_vector.jl b/test/commutative/monomial_vector.jl similarity index 100% rename from test/monomial_vector.jl rename to test/commutative/monomial_vector.jl diff --git a/test/mutable_arithmetics.jl b/test/commutative/mutable_arithmetics.jl similarity index 100% rename from test/mutable_arithmetics.jl rename to test/commutative/mutable_arithmetics.jl diff --git a/test/norm.jl b/test/commutative/norm.jl similarity index 100% rename from test/norm.jl rename to test/commutative/norm.jl diff --git a/test/polynomial.jl b/test/commutative/polynomial.jl similarity index 100% rename from test/polynomial.jl rename to test/commutative/polynomial.jl diff --git a/test/promote.jl b/test/commutative/promote.jl similarity index 100% rename from test/promote.jl rename to test/commutative/promote.jl diff --git a/test/rational.jl b/test/commutative/rational.jl similarity index 100% rename from test/rational.jl rename to test/commutative/rational.jl diff --git a/test/show.jl b/test/commutative/show.jl similarity index 100% rename from test/show.jl rename to test/commutative/show.jl diff --git a/test/substitution.jl b/test/commutative/substitution.jl similarity index 100% rename from test/substitution.jl rename to test/commutative/substitution.jl diff --git a/test/term.jl b/test/commutative/term.jl similarity index 100% rename from test/term.jl rename to test/commutative/term.jl diff --git a/test/variable.jl b/test/commutative/variable.jl similarity index 100% rename from test/variable.jl rename to test/commutative/variable.jl diff --git a/test/zip.jl b/test/commutative/zip.jl similarity index 100% rename from test/zip.jl rename to test/commutative/zip.jl diff --git a/test/commutativetests.jl b/test/commutativetests.jl index c4bb9d63..36876649 100644 --- a/test/commutativetests.jl +++ b/test/commutativetests.jl @@ -1,30 +1,6 @@ -include("mutable_arithmetics.jl") - -include("zip.jl") -include("variable.jl") -include("monomial.jl") -include("term.jl") -include("monomial_vector.jl") -include("polynomial.jl") -include("det.jl") - -include("rational.jl") -isdefined(Mod, Symbol("@complex_polyvar")) && include("complex.jl") - -include("promote.jl") -include("hash.jl") -include("norm.jl") - -include("algebra.jl") -include("comparison.jl") - -include("substitution.jl") -include("differentiation.jl") -include("division.jl") -include("gcd.jl") -include("chain_rules.jl") - -include("show.jl") - -include("example1.jl") -include("example2.jl") +for file in readdir(joinpath(@__DIR__, "commutative")) + if file == "complex.jl" && !isdefined(Mod, Symbol("@complex_polyvar")) + continue + end + include(joinpath(@__DIR__, "commutative", file)) +end diff --git a/test/nccomparison.jl b/test/noncommutative/comparison.jl similarity index 100% rename from test/nccomparison.jl rename to test/noncommutative/comparison.jl diff --git a/test/ncmonomial.jl b/test/noncommutative/monomial.jl similarity index 100% rename from test/ncmonomial.jl rename to test/noncommutative/monomial.jl diff --git a/test/ncoperators.jl b/test/noncommutative/operators.jl similarity index 100% rename from test/ncoperators.jl rename to test/noncommutative/operators.jl diff --git a/test/noncommutativetests.jl b/test/noncommutativetests.jl index 100cd8e7..75a6c23c 100644 --- a/test/noncommutativetests.jl +++ b/test/noncommutativetests.jl @@ -1,3 +1,3 @@ -include("ncmonomial.jl") -include("ncoperators.jl") -include("nccomparison.jl") +for file in readdir(joinpath(@__DIR__, "noncommutative")) + include(joinpath(@__DIR__, "noncommutative", file)) +end