Symbolic transformations
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Symbolic transformations

  1. #1
    Join Date
    Jun 2014
    Posts
    9

    Symbolic transformations

    Which is method to symbolic transformations of equations?
    For example: I must find equation of line passing through two points (x0,y0) and (x1,y) in form Ax + By + C = 0
    this equation is (y-y0)*(x1-x0) = (x-x0)*(y1-y0)
    algorithm must change it to (y1-y0)x + (x0-x1)y + y0(x1-x0) + x0(y0-y1)

  2. #2
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,262

    Re: Symbolic transformations

    To convert your eqn 1 to eqn 2 is simply a matter of basic algebraic manipulation which can be done on paper in a couple of lines. So the method is just using algebraic manipulation.

    Note that your eqn 2 can be further simplified to

    Code:
    x(y1 - y0) + y(x0 -x1) + (x1y0 - x0y1) = 0
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  3. #3
    Join Date
    Jun 2014
    Posts
    9

    Re: Symbolic transformations

    Algebraic programs prefers Lisp. If is possible code it with Java?

  4. #4
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,262

    Re: Symbolic transformations

    Quote Originally Posted by Borneq View Post
    Algebraic programs prefers Lisp. If is possible code it with Java?
    Code what?
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  5. #5
    Join Date
    Jul 2013
    Posts
    201

    Re: Symbolic transformations

    Quote Originally Posted by Borneq View Post
    Which is method to symbolic transformations of equations?
    The method is simple in principle.

    You build a tree representing the equations. Then you transform the tree to conform to your wanted representation of the equations.

    Usually the transformations are a set of replacement rules. Each such rule consists of a pattern and what that pattern is supposed to be replace by when the pattern is identified in the tree. It's a language really.

    The set of rule patterns are let loose on the tree and the tree becomes modified accordingly until no pattern applies anymore. Then the tree has reached it's fully transformed state and if the transformation language was well designed the equations are now in the form you expected.

    This is for example how compilers transform expressions in the optimization phase.
    Last edited by razzle; July 18th, 2014 at 04:35 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center