Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5979

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>SCSCPConnection &lt;== Thing -- Execute computations using SCSCP</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div><a href="_start__Server.html">next</a> | <a href="___S__C__S__C__P__Connection.html">previous</a> | <a href="_start__Server.html">forward</a> | <a href="___S__C__S__C__P__Connection.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>SCSCPConnection &lt;== Thing -- Execute computations using SCSCP</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>s x</tt></div>
</dd></dl>
</div>
</li>
<li><span>Operator: <a href="../../Macaulay2Doc/html/__lt_eq_eq.html" title="a unary and binary operator">&lt;==</a></span></li>
<li><div class="single">Inputs:<ul><li><span><tt>s</tt>, <span>an object of class <a href="___S__C__S__C__P__Connection.html" title="The class of all SCSCP connections">SCSCPConnection</a></span>, The server that should compute it</span></li>
<li><span><tt>x</tt>, <span>a <a href="../../Macaulay2Doc/html/___Thing.html">thing</a></span>, The expression to be computed </span></li>
</ul>
</div>
</li>
<li><div class="single">Outputs:<ul><li><span><span>a <a href="../../Macaulay2Doc/html/___Thing.html">thing</a></span>, The result of the computation</span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>As an example, we connect to a locally running SCSCP server: <table class="examples"><tr><td><pre>
i1 : s = newConnection("127.0.0.1", 26135)

o1 = SCSCP Connection to GAP (4.dev) on 127.0.0.1:26135

o1 : SCSCPConnection

i2 : s( (hold 2) + 3)

o2 = 5

i3 : close s

i4 : </pre>
</td></tr>
</table>
We could also explicitly have a look at the OpenMath that's being passed around<table class="examples"><tr><td><pre>
i1 : s = newConnection("127.0.0.1", 26135)

o1 = SCSCP Connection to GAP (4.dev) on 127.0.0.1:26135

o1 : SCSCPConnection

i2 : o = openMath ( (hold 2) + 3 )

o2 = &lt;OMA
       &lt;OMS cd="arith1" name="plus"
       &lt;OMI "2"
       &lt;OMI "3"

o2 : XMLnode

i3 : s(o)

o3 = &lt;OMOBJ
       &lt;OMATTR
         &lt;OMATP
           &lt;OMS cd="scscp1" name="call_id"
           &lt;OMSTR "1"
         &lt;OMA
           &lt;OMS cd="scscp1" name="procedure_completed"
           &lt;OMI "5"

o3 : XMLnode

i4 : value oo

o4 = 5

i5 : close s

i6 : </pre>
</td></tr>
</table>
Another syntax offered is using the &lt;== and &lt;=== operators. The first of these denotes a computation that returns the computed object, whereas the second denotes a computation that returns a reference (i.e. a remote object). Fortunately, these operators have lower parsing precedence than most others, so few parentheses will be required.<table class="examples"><tr><td><pre>
i1 : s = newConnection("127.0.0.1", 26136)

o1 = SCSCP Connection to Magma (0.3.0) on 127.0.0.1:26136

o1 : SCSCPConnection

i2 : s &lt;== (hold 2)^32

o2 = 4294967296

i3 : s &lt;=== (hold 2)^333

o3 = &lt;&lt; Remote Magma object >>

o3 : RemoteObject

i4 : 2^301

o4 = 4074071952668972172536891376818756322102936787331872501272280898708762599526673412366794752

i5 : s &lt;== o3/o4

o5 = 4294967296

o5 : QQ

i6 : close s

i7 : </pre>
</td></tr>
</table>
</div>
</div>
<div class="single"><h2>See also</h2>
<ul><li><span><a href="_new__Connection.html" title="Create a connection to an SCSCP server">newConnection</a> -- Create a connection to an SCSCP server</span></li>
<li><span><a href="___Manipulator_sp__S__C__S__C__P__Connection.html" title="Close an SCSCP connection">Manipulator SCSCPConnection</a> -- Close an SCSCP connection</span></li>
<li><span><a href="___Remote__Object.html" title="The class of all remote SCSCP objects">RemoteObject</a> -- The class of all remote SCSCP objects</span></li>
</ul>
</div>
</div>
</body>
</html>