[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.1

1.1     ! ohara       1: (* $OpenXM$ *)
        !             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
        !            15: In[2]:= betaNbcBasis[ {z-t, t, t-s, s, 1-s}, {t,s} ];
        !            16: Out[2]= {{{t, -s + t}, {s}}, {{t}, {1 - s}}, {{-s + t}, {1 - s}}}
        !            17:
        !            18: ---
        !            19: We explains output above.
        !            20: the elements of ``Out[2]'' are a differntial form.
        !            21: For example, {{t, -s + t}, {s}} means the following form:
        !            22: ( dlog(t) + dlog(-s+t) ) \wedge ( dlog(s) ).
        !            23: *)
        !            24:
        !            25: asirRtostr[x_] := Module[
        !            26:        {list = {}, i, s},
        !            27:        If[ x[[0]] === List,
        !            28:          list = Append[list, " [ " ];
        !            29:          If[ Length[x] > 0 ,
        !            30:                list = Append[list, asirRtostr[ x[[1] ] ] ];
        !            31:                For[i=2, i<= Length[x], i++,
        !            32:                   list = Append[list, " , "];
        !            33:                   list = Append[list, asirRtostr[ x[[i]] ] ]
        !            34:                        ]
        !            35:                  ];
        !            36:          list = Append[list, " ] "];
        !            37:          s = StringJoin[list],
        !            38:          s = ToString[x, InputForm]
        !            39:                ]
        !            40:        ]
        !            41:
        !            42: toForm[polys_List, bnbc_List] := Module[
        !            43:        {list1, list2, list3, i,j,k},
        !            44:        list1 = {};
        !            45:        For[i=1, i<=Length[bnbc], i++,
        !            46:           list2 = {};
        !            47:           For[j=1, j<=Length[bnbc[[i]]], j++,
        !            48:                  list3 = {};
        !            49:                  For[k=1, k<=Length[bnbc[[i]][[j]]], k++,
        !            50:                         list3 = Append[list3, polys[[bnbc[[i]][[j]][[k]]]]];
        !            51:                          ];
        !            52:                  list2 = Append[list2, list3]
        !            53:                   ];
        !            54:           list1 = Append[list1, list2]
        !            55:                ];
        !            56:        list1
        !            57:        ]
        !            58:
        !            59: betaNbcBasis[polys_List, vars_List] := Module[
        !            60:        {s, arr, bnbc},
        !            61:        arr = {polys, vars};
        !            62:        order = Range[Length[polys]];
        !            63:        s = StringJoin[ {"IG = igraph_getIGraph( ", asirRtostr[arr], " );"}];
        !            64:        OxExecuteString[s];
        !            65:        s = StringJoin[ {"Order = ", asirRtostr[order], ";"}];
        !            66:        OxExecuteString[s];
        !            67:        s = "BF = beta_betaNbcSet2forms(beta_getBetaNbcSet(IG, Order), IG, Order);";
        !            68:        OxExecuteString[s];
        !            69:        OxExecuteString["m_rtostr(BF);"];
        !            70:        bnbc = ToExpression[OxPopString[]];
        !            71:        toForm[polys, bnbc]
        !            72:        ]
        !            73:
        !            74: Install[Environment["OpenXM_HOME"] <> "/bin/math2ox"]
        !            75: OxStart["ox_asir"]

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