[BACK]Return to beta.m CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_math / lib

Annotation of OpenXM/src/ox_math/lib/beta.m, Revision 1.2

1.2     ! ohara       1: (* $OpenXM: OpenXM/src/ox_math/lib/beta.m,v 1.1 1999/12/17 04:01:35 ohara Exp $ *)
1.1       ohara       2:
                      3: (*
                      4: This program reuires asir programs beta, igraph, sets;
                      5: these files are in OpenXM/src/asir-contrib/packages/src/.
                      6: you must add load("beta") to your .asirrc.
                      7:
                      8: usage:
                      9: $ math
                     10: Mathematica 3.0 for Linux
                     11: Copyright 1988-97 Wolfram Research, Inc.
                     12:  -- Motif graphics initialized --
                     13:
                     14: In[1]:= <<beta.m
1.2     ! ohara      15: In[2]:= OxStart["ox_asir"]
        !            16: In[3]:= betaNbcBasis[ {z-t, t, t-s, s, 1-s}, {t,s} ];
        !            17: Out[3]= {{{t, -s + t}, {s}}, {{t}, {1 - s}}, {{-s + t}, {1 - s}}}
1.1       ohara      18:
                     19: ---
                     20: We explains output above.
                     21: the elements of ``Out[2]'' are a differntial form.
                     22: For example, {{t, -s + t}, {s}} means the following form:
1.2     ! ohara      23: ( a_1 dlog(t) + a_2 dlog(-s+t) ) \wedge ( a_3 dlog(s) ),
        !            24: where a_1, a_2, a_3 are exponents.
1.1       ohara      25: *)
                     26:
                     27: toForm[polys_List, bnbc_List] := Module[
                     28:        {list1, list2, list3, i,j,k},
                     29:        list1 = {};
                     30:        For[i=1, i<=Length[bnbc], i++,
                     31:           list2 = {};
                     32:           For[j=1, j<=Length[bnbc[[i]]], j++,
                     33:                  list3 = {};
                     34:                  For[k=1, k<=Length[bnbc[[i]][[j]]], k++,
                     35:                         list3 = Append[list3, polys[[bnbc[[i]][[j]][[k]]]]];
                     36:                          ];
                     37:                  list2 = Append[list2, list3]
                     38:                   ];
                     39:           list1 = Append[list1, list2]
                     40:                ];
                     41:        list1
                     42:        ]
                     43:
                     44: betaNbcBasis[polys_List, vars_List] := Module[
                     45:        {s, arr, bnbc},
                     46:        arr = {polys, vars};
                     47:        order = Range[Length[polys]];
                     48:        s = StringJoin[ {"IG = igraph_getIGraph( ", asirRtostr[arr], " );"}];
                     49:        OxExecuteString[s];
                     50:        s = StringJoin[ {"Order = ", asirRtostr[order], ";"}];
                     51:        OxExecuteString[s];
                     52:        s = "BF = beta_betaNbcSet2forms(beta_getBetaNbcSet(IG, Order), IG, Order);";
                     53:        OxExecuteString[s];
                     54:        OxExecuteString["m_rtostr(BF);"];
                     55:        bnbc = ToExpression[OxPopString[]];
                     56:        toForm[polys, bnbc]
                     57:        ]
                     58:
1.2     ! ohara      59: Get[Environment["OpenXM_HOME"] <> "/lib/math/oxclient.m"]

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>