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

File: [local] / OpenXM / src / ox_math / lib / primadec.m (download)

Revision 1.4, Mon Mar 6 09:59:50 2000 UTC (24 years, 2 months ago) by ohara
Branch: MAIN
CVS Tags: maekawa-ipv6, R_1_3_1-2, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, RELEASE_1_1_3, RELEASE_1_1_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.3: +9 -7 lines

primadec.m supports multi ox connections.

(* $OpenXM: OpenXM/src/ox_math/lib/primadec.m,v 1.4 2000/03/06 09:59:50 ohara Exp $ *)

(*
usage:
$ math
Mathematica 3.0 for Linux
Copyright 1988-97 Wolfram Research, Inc.
 -- Motif graphics initialized -- 

In[1]:= <<primadec.m
In[2]:= primadec[{x^2-3*x+2},{x}]
Out[2]= {{{-1 + x}, {-1 + x}}, {{-2 + x}, {-2 + x}}}
*)

primadec[polys_List, vars_List] := Block[
	{s, expr, fd},
	s = StringJoin[
		{"m_rtostr(primadec( ", asirRtostr[polys], " , ",  asirRtostr[vars], " ));"}];
	fd = OxStart["ox_asir"];
	OxExecuteString[fd, s];
	expr = ToExpression[OxPopString[fd]];
	OxClose[fd];
	Return[expr]
	]

Get[Environment["OpenXM_HOME"] <> "/lib/math/oxclient.m"]