transfinite | Transfinite ordinal arithmetic and factorisation | Math library

 by   ajcr Python Version: 0.5.2 License: MIT

kandi X-RAY | transfinite Summary

kandi X-RAY | transfinite Summary

transfinite is a Python library typically used in Utilities, Math applications. transfinite has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install transfinite' or download it from GitHub, PyPI.

Transfinite ordinal arithmetic and factorisation up to the first epsilon number.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              transfinite has a low active ecosystem.
              It has 6 star(s) with 1 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 5 have been closed. On average issues are closed in 510 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of transfinite is 0.5.2

            kandi-Quality Quality

              transfinite has no bugs reported.

            kandi-Security Security

              transfinite has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              transfinite is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              transfinite releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed transfinite and discovered the below as its top functions. This is intended to give you an instant insight into transfinite implemented functionality, and help decide if they suit your requirements.
            • Return a LaTeX representation of the expression
            • Return the formula as a LaTeX string
            • Return a latex representation of an ordinal
            Get all kandi verified functions for this library.

            transfinite Key Features

            No Key Features are available at this moment for transfinite.

            transfinite Examples and Code Snippets

            transfinite,Installation
            Pythondot img1Lines of Code : 1dot img1License : Permissive (MIT)
            copy iconCopy
            pip install transfinite
              
            Questions about the Gmsh Python API
            Pythondot img2Lines of Code : 2dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            s2 = gmsh.model.geo.copy([(1, s1)])
            

            Community Discussions

            QUESTION

            How to create a 3D X,Y,Z array from 2D faces so that contiguity between points is preserved
            Asked 2021-Feb-18 at 10:36

            I'm trying to implement an algorithm that from six 2-D matrices of X,Y,Z points store them in a 3D matrix of X,Y,Z points in such a manner that their connectivity is preserved. An example will clarify the problem.

            I've to represent with three 3-D matrices

            ...

            ANSWER

            Answered 2021-Feb-18 at 10:36

            So If I get it right you got 6x 2D matrices of 3D points representing 6 surfaces of some shape (that connects together) in any flip/mirror/order state between each-other and want to construct single 3D matrix with empty interior (for example point (0,0,0) and its surface will contain the 6 surfaces reordered reoriented so their edges match.

            As you always have 6 3D surfaces with 2D topology your 3D topology can be fixed which simplifies things alot.

            1. define 3D topology

              It can be any I decided to use this one:

            Source https://stackoverflow.com/questions/66222291

            QUESTION

            Working with transfinite ordinals in JavaScript
            Asked 2020-Apr-16 at 09:06

            I'm attempting to program a transfinite ordinal calculator in JavaScript. In other words, find a way to process ordinal arithmetic in js.

            I'm planning on using ES6's classes, with some form of constructor, and methods for processing comparisons of terms and operations such as addition or multiplication over the set of ordinals. The problem is that I don't know where to start. I need firstly a way to store ordinals in an instance of an Ordinal class, and a way of comparing to Ordinals. After that point everything should be smooth sailing.

            If anyone could provide any insight into how I might approach this, I'd greatly appreciate it.

            ...

            ANSWER

            Answered 2020-Apr-16 at 09:06

            In the last 6 months I've found several methods of storing ordinals, these include:

            • Cantor Normal Form as an array
            • Extended Cantor Normal Form as nested arrays of pairs
            • An ordinal notation (known as TAN) developed by a member of the Googology community
            • Veblen's Hierarchy of Fixed Points
            • An ordinal collapsing function

            Disclaimer: I use a common convention when writing out ordinals. I use w to represent omega, the least transfinite ordinal; e to represent the epsilon numbers (fixed points of a -> w^a) or the function enumerating them; similarly, in the case of Veblen's Hierarchy I'll use phi to denote such for ordinal collapsing functions I'll use psi. When explaining how operations work I'll use this to denote the first operand and other to denote the second.

            Cantor Normal Form expresses ordinals as the sum of terms in the form w^b * a and therefore has a limit of w^w, intuitively it can be expressed as an array, where the i'th element of the term represents the a in the term w^i * a, e.g. the array [4, 5, 6] represents the ordinal w^2*6 + w*5 + 4. Adding is simple enough. Based on the principle that 1 + w = w, w + w^2 = w^2 and so on, we can fill the array with 0s up to the other.length - 1'th element and then add the elements in other to their corresponding elements in this. Multiplication is more tricky. If other contains multiple non-zero elements, we can use the distributive law (which doesn't apply the other way) and return the sum of this multiplied by each of other's terms. Otherwise, if this has multiple non-zero elements, if other is finite (other.length == 1) then multiply the most significant term of this by other and return other. In the final case ignore all but the most significant term of this and multiply by other. And if both operands have only one term then shift a bunch of 0s into this (specifically other.length - 1) and return this. Exponentiation is trivial then as other must be finite otherwise the result would surpass the range of this method, and can just be done by iterating multiplication, because I'm lazy and can do better later.

            Extended Cantor Normal Form is similar, though the exponents for each term can also be ordinals, which complicates things, though extends the limit of this to e0 (the least fixed point of a -> w^a. We can store ordinals as an array of pairs. The first element of the pair can be coefficient of the terms and the second element is the exponent, represented by another array of pairs. The first thing that needs to be addressed in this form would be normalization. Firstly you'd need to remove all terms which are 0, then iterate through the array and keep track of the largest exponent, if you encounter an element with a lower exponent that the current highest you'd splice it out of the array. Once this is done you check for terms with the same exponent and add the coefficient of the other to one, removing the other. The array will then be normalized (there's probably a more efficient way to do this, leave a comment). Addition follows then become trivial. Simply concatenate the arrays of other and this and normalize. Multiplication is similar to before. If other.length > 1 then we can use the distributive law (which doesn't apply the other way) and return the sum of this multiplied by each of other's terms. Otherwise, if this has multiple terms, if other is finite then multiply the most significant term of this by other and return other. In the final case ignore all but the most significant term of this and multiply by other. Then simply add the exponent of other's only term to this's only term and return this. Exponentiation is no longer trivial, but isn't difficult. Firstly, remove all but the most significant term from this, then multiply the exponent by other. Done.

            A member of the Googology* community, TGR, created TAN as an extremely powerful array notation for generating large numbers, though it was essentially the fast growing hierarchy with an array-like ordinal notation. The ordinal notation isn't exactly well defined, though it can be understood well enough. TAN. Note that I would only code the arrays without 'separators' for simplicity. Ordinals can be stored as arrays where elements are either arrays or integers. Normalization can be done by popping 0s off the end of the array and checking if any elements have greater value than the outer array (without that element), if they are, then remove the outer array. This is as each of the elements of the arrays enumerates as a function of the form a + b, a * w^b, e, phi_2, phi_3 etc, and such an array just as [0, 0, [0, 0, 0, 1]] would be e(psi_2(0)) which is simply equal to phi_2(0) as phi_2(0) is a fixed point of the function enumerating the epsilon numbers. Adding in this notation is simple, take the first element of the this, and then the first element of that, and so on until we get to an integer, then if other is finite simply add it on, if other is transfinite then replace the integer in this. Multiplying is similar, though you instead increase the second term. Again applying the distributive law when necessary, and making sure that it is recognized that increasing the second element by a is the same as multiplying by w^a. As mentioned above, exponentiating is the same as multiplying the exponent and then removing the added part. This was my favourite method of storing ordinals because it's rather unique and interesting, and has a high limit which is easy to achieve.

            The other two notations are likely possible, and I've had ideas for how to do so. Veblen Hierarchy could be stored similarly to TAN though storing an array of terms like CNF and ECNF, and each term is an array in Veblen Style, though each element must also be an array of terms to allow the ability to store all ordinals. Ordinal collapsing functions would be more difficult, I propose storing the symbolic string as an abstract syntax tree, the primary issue would be normalization as that could get out of control very easily,

            *the study and nomenclature of large finite numbers, though as fast growing and other ordinal hierarchies play an important role in such, there is a large variety of ordinal notation developed, though most would be incredibly difficult to program.

            Source https://stackoverflow.com/questions/58160263

            QUESTION

            Duplicate structured surface/mesh in gmsh
            Asked 2018-Apr-28 at 17:23

            I'm trying to build a large structure from a simple geometric shape in gmsh and I'd like to use a structured (quadrilateral) grid. I start by creating that shape and then duplicating and translating it as often as needed to build my final structure.

            The problem is that even if I define the lines and surfaces of the original shape to be transfinite, this property is lost once I duplicate and translate it. Check this sample code for a square:

            ...

            ANSWER

            Answered 2018-Apr-28 at 17:23

            It is possible.

            You can use the GMSH Geometry.CopyMeshingMethod property that is responsible for copying the meshing method for duplicated or translated geometric entities. By default, it is turned off. To turn it on, you can simply add the following line to the beginning of your GEO file.

            Source https://stackoverflow.com/questions/49197879

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install transfinite

            Works with Python 3. Can be installed via pip using:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install transfinite

          • CLONE
          • HTTPS

            https://github.com/ajcr/transfinite.git

          • CLI

            gh repo clone ajcr/transfinite

          • sshUrl

            git@github.com:ajcr/transfinite.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link