<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://drorbn.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=70.29.23.228</id>
	<title>Drorbn - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://drorbn.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=70.29.23.228"/>
	<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=Special:Contributions/70.29.23.228"/>
	<updated>2026-05-07T12:53:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://drorbn.net/index.php?title=VasCalc_Documentation_-_vectorSpace&amp;diff=1430</id>
		<title>VasCalc Documentation - vectorSpace</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=VasCalc_Documentation_-_vectorSpace&amp;diff=1430"/>
		<updated>2006-05-29T23:26:18Z</updated>

		<summary type="html">&lt;p&gt;70.29.23.228: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The vectorSpace package is a small package used to set up quotients of finite dimensional vector spaces, with an interface through Mathematica. By default, vectorSpace works over arbitrarily-sized rationals, using the BigRational implementation written by Eric Laroche (see [[VasCalc - Bibliography]]).  See below for instructions on using other fields. The main advantage in using this package is that by being less general, it stands to perform much faster than similar functions in Mathematica.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
If you wish to use this package on its own, follow the directions below.&lt;br /&gt;
&lt;br /&gt;
Create a directory on your file system named &amp;lt;i&amp;gt;vectorSpace&amp;lt;/i&amp;gt;, and download the following four files from the repository into it:&lt;br /&gt;
&lt;br /&gt;
*[http://katlas.math.toronto.edu/svn/VasCalc/trunk/vectorSpace/Coefficient.class Coefficient.class], &lt;br /&gt;
*[http://katlas.math.toronto.edu/svn/VasCalc/trunk/vectorSpace/QuotientSpace.class QuotientSpace.class], &lt;br /&gt;
*[http://katlas.math.toronto.edu/svn/VasCalc/trunk/vectorSpace/AlgebraVector.class AlgebraVector.class],&lt;br /&gt;
*[http://katlas.math.toronto.edu/svn/VasCalc/trunk/vectorSpace/BigRational.class BigRational.class].&lt;br /&gt;
&lt;br /&gt;
Also, download [http://katlas.math.toronto.edu/svn/VasCalc/trunk/vectorSpace.m vectorSpace.m] (the Mathematica interface) to any location.&lt;br /&gt;
&lt;br /&gt;
Now open vectorSpace.m in a text editor. Near the top, there is a line that reads &lt;br /&gt;
:&amp;lt;code&amp;gt;AddToClassPath[&amp;quot;some_path&amp;quot;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;i&amp;gt;some_path&amp;lt;/i&amp;gt; to the location in which the directory &amp;lt;i&amp;gt;vectorSpace&amp;lt;/i&amp;gt; resides (ie. the parent directory of &amp;lt;i&amp;gt;vectorSpace&amp;lt;/i&amp;gt;). Make sure you keep the quotes around the path name.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
In Mathematica, type &lt;br /&gt;
: &amp;lt;code&amp;gt; In[ ]:= &amp;lt;&amp;lt; /path_to_/vectorSpace.m &amp;lt;/code&amp;gt;&lt;br /&gt;
to load the definitions.&lt;br /&gt;
&lt;br /&gt;
We need to start by setting up a finite-dim vector space to work with. The command NewVS[n] returns a reference to a Java instance of the class QuotientSpace. This class represents a v.s. of dimension n, along with any relations between the basis vectors (described below). Here we create a vector space of dimension 5:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; In[ ] := qs = NewVS[5]; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the vector space package, vectors are stored as lists of ordered pairs {index, coeff}, where the index refers to a fixed implicit original basis. For convenience, the Mathematica interface allows one to label the basis elements with Mathematica symbols by passing a Basis[..] object to the operations described below, and hence you can use all of Mathematica&#039;s symbolic manipulations on these expressions. Note, however, that this labelling does not change the internal representation of the vectors; if you change the basis you use, it&#039;s unlikely you&#039;ll get meaningful results, as you may have already defined relations in terms of another basis. &lt;br /&gt;
&lt;br /&gt;
To set up an initial basis, say of elements e0, ... , e4:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; In[] := b= Basis[e0,e1,e2,e3,e4]; &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here are the operations one can perform:&lt;br /&gt;
&lt;br /&gt;
*To introduce a relation, use &amp;lt;code&amp;gt;ModBy[v, quotientspace, basis]&amp;lt;/code&amp;gt;, which introduces the relation v=0 (where v is written in terms of &amp;lt;code&amp;gt;basis&amp;lt;/code&amp;gt;) in the given vector space &amp;lt;code&amp;gt;quotientspace&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
*The command &amp;lt;code&amp;gt;GetDimension[quotientspace]&amp;lt;/code&amp;gt;, returns the dimension of the quotient (that is, taking into account the relations defined). &lt;br /&gt;
&lt;br /&gt;
*The command &amp;lt;code&amp;gt;ReduceQuotient[v, quotientspace, basis]&amp;lt;/code&amp;gt; returns a vector equivalent to v modulo the relations defined in &amp;lt;code&amp;gt;quotientspace&amp;lt;/code&amp;gt;. Both v and the output are written as linear combinations in terms of the given basis.&lt;br /&gt;
&lt;br /&gt;
*If you need it, the command &amp;lt;code&amp;gt;ResolveVector[v, basis]&amp;lt;/code&amp;gt; converts a vector as a formal sum into a list of {index, coeff} pairs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some examples, using the earlier setup:&lt;br /&gt;
Let&#039;s introduce a relation &lt;br /&gt;
:&amp;lt;code&amp;gt;In[ ] := ModBy[3e0 + e3 - 2e4, qs, b] &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the quotient space has one less dimension:&lt;br /&gt;
:&amp;lt;code&amp;gt;In[ ] := GetDimension[qs]&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Out[ ] = 4&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;In[ ] := ResolveQuotient[e0 + (1/3)e1 - e4, qs, b]&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Out[ ] = e1/4 - (2*e3)/3 + e4/3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;In[ ]:= ResolveVector[3e1 +2/3 e0 - 2 e2, b] &amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;Out[ ] = { {0,2/3}, {1,3}, {2,-2} } &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changing the Coefficient Field===&lt;/div&gt;</summary>
		<author><name>70.29.23.228</name></author>
	</entry>
	<entry>
		<id>https://drorbn.net/index.php?title=VasCalc_-_Progress_Log&amp;diff=1405</id>
		<title>VasCalc - Progress Log</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=VasCalc_-_Progress_Log&amp;diff=1405"/>
		<updated>2006-05-18T22:39:15Z</updated>

		<summary type="html">&lt;p&gt;70.29.23.228: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the [[VasCalc - A Vassiliev Invariants Calculator|VasCalc Project]] Progress Log.&lt;br /&gt;
&lt;br /&gt;
====Monday May 15 2006====&lt;br /&gt;
Another slightly different HelloWorld test has been added to the [http://katlas.math.toronto.edu/svn/VasCalc/trunk/  SVN repository]. This time, one can use the default Java runtime bundled with Mathematica/Windows (so the user does not need to know anything about where Java lives on their system) by telling the Java compiler to produce code for Java 1.4. This is accomplished by issuing the command:&lt;br /&gt;
:&amp;lt;code&amp;gt;javac -source 1.4 -target 1.4 file_to_be_compiled.java &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I suppose this prevents us from using the new features of Java 1.5, but I don&#039;t know what they are.&lt;br /&gt;
&lt;br /&gt;
As for the test program, download [http://katlas.math.toronto.edu/svn/VasCalc/trunk/javatest.m javatest.m] and [http://katlas.math.toronto.edu/svn/VasCalc/trunk/test1.class test1.class], and issue the following commands in Mathematica (replacing the &#039;/path_to_files&#039; with the location you downloaded the files to, and don&#039;t forget the quotes in the second line):&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; &amp;lt;&amp;lt; /path_to_files/javatest.m &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt; HelloWorld[VasCalcPath -&amp;gt; &amp;quot;/path_to_files&amp;quot;] &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and read your mystery message!&lt;br /&gt;
&lt;br /&gt;
==== Sunday May 14 2006====&lt;br /&gt;
J/Link passed the Hello World test. The java class and Mathematica&lt;br /&gt;
notebook were commited to the repository trunk. Note the Mathematica file&lt;br /&gt;
must be edited in order to specify the path to java and the class.&lt;br /&gt;
In order to get it to work I had to tweak a few things:&lt;br /&gt;
* The JRE bin directory had to be added to the PATH. The JDK path is not enough because J/Link looks for files like jawt.dll and awt.dll that don&#039;t come with JDK.&lt;br /&gt;
* HelloWorld.class had to be in one of the dirs in CLASSPATH, because J/Link loads classes only through their full class name.&lt;br /&gt;
* In Mathematica, when running InstallJava[], it was necessary to specify the path name for a newer version of java.exe. By default it runs the Windows java, which didn&#039;t run what was compiled with a new JDK. &lt;br /&gt;
&lt;br /&gt;
Ideally, one would like to write a Mathematica notebook without&lt;br /&gt;
any hardcoded paths that others can use with no changes. Is this&lt;br /&gt;
possible?&lt;br /&gt;
&lt;br /&gt;
==== Thursday May 11 20006====&lt;br /&gt;
* First day meeting&#039;s blackboard: [[Image:060511-1.jpg|thumb|160px|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot;&amp;gt;&lt;/div&gt;</summary>
		<author><name>70.29.23.228</name></author>
	</entry>
</feed>