Skip to content

Instantly share code, notes, and snippets.

View jksuom's full-sized avatar

Kalevi Suominen jksuom

View GitHub Profile
@jksuom
jksuom / groups.md
Last active January 5, 2024 14:13
On implementation of groups in SymPy

Groups defined by generators (and relators) are analogous to polynomial rings (and their quotient rings). In SymPy there are three different ways of representing polynomials: general expressions, and then dense and sparse representations. Expressions are convenient to use as they are essentially self-contained. But they are less efficient in computations while the other two are each best for specific purposes.

There could also be three types of representations for elements of groups.

@jksuom
jksuom / polynomials.md
Created August 27, 2015 12:00
Polynomials in SymPy

It seems that implementation of polynomials in sympy and symengine could be closely parallel.

There should be three kinds of polynomials: (standard) polynomials, Laurent polynomials, and Puiseux polynomials, thus adding a "fourth dimension" to the classification in the wiki (https://github.com/sympy/symengine/wiki/En-route-to-Polynomial). They can also be used for representing (truncated) series of respective types.

@jksuom
jksuom / lindiop.rst
Created August 4, 2015 08:04
Linear diophantine equations

Linear diophantine equations

A general linear nonhomogeneous diophantine equation is of the form

a_0x_0 + a_1x_1 +\cdots+ a_nx_n = c

where the coefficients a_i and the constant c are integers. The components x_i of its solutions are also expected to be integers.

@jksuom
jksuom / svg.md
Created July 7, 2015 06:34
Drawing SVG

Interpretation of

M 210.11173,460.41281 C 167.68532,274.54475 107.07617,197.77315 290.92393,304.84932 474.77169,411.92549 610.13214,541.22502 408.10163,444.25038 206.07112,347.27573 597.03099,636.66328 367.69552,609.91539 21.255008,569.50929 228.75342,542.08117 210.11173,460.41281 Z

The M command sets the starting point.

The C command defines a series of consecutive cubic Bézier curves.

The Z command closes the path.