]> www.ginac.de Git - ginac.git/blobdiff - ginac/inifcns.cpp
introduced new class for constructing symmetry tree definitions
[ginac.git] / ginac / inifcns.cpp
index b55261eb1a0072939b0a1bb43a2a317d681778ec..e2714cf2ccbd98b1c49e7c68cab18ac45e3a1d49 100644 (file)
@@ -29,8 +29,6 @@
 #include "lst.h"
 #include "matrix.h"
 #include "mul.h"
-#include "ncmul.h"
-#include "numeric.h"
 #include "power.h"
 #include "relational.h"
 #include "pseries.h"
@@ -475,15 +473,15 @@ ex lsolve(const ex &eqns, const ex &symbols)
                for (unsigned c=0; c<symbols.nops(); c++) {
                        ex co = eq.coeff(ex_to_symbol(symbols.op(c)),1);
                        linpart -= co*symbols.op(c);
-                       sys.set(r,c,co);
+                       sys(r,c) = co;
                }
                linpart = linpart.expand();
-               rhs.set(r,0,-linpart);
+               rhs(r,0) = -linpart;
        }
        
        // test if system is linear and fill vars matrix
        for (unsigned i=0; i<symbols.nops(); i++) {
-               vars.set(i,0,symbols.op(i));
+               vars(i,0) = symbols.op(i);
                if (sys.has(symbols.op(i)))
                        throw(std::logic_error("lsolve: system is not linear"));
                if (rhs.has(symbols.op(i)))
@@ -509,20 +507,6 @@ ex lsolve(const ex &eqns, const ex &symbols)
        return sollist;
 }
 
-/** non-commutative power. */
-ex ncpow(const ex & basis, unsigned exponent)
-{
-       if (exponent == 0)
-               return _ex1();
-
-       exvector v;
-       v.reserve(exponent);
-       for (unsigned i=0; i<exponent; ++i)
-               v.push_back(basis);
-
-       return ncmul(v, true);
-}
-
 /** Force inclusion of functions from initcns_gamma and inifcns_zeta
  *  for static lib (so ginsh will see them). */
 unsigned force_include_tgamma = function_index_tgamma;