LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2019, 12:03 AM   #1
sibelius
Member
 
Registered: Oct 2018
Location: Leura NSW Australia
Distribution: Linux Knoppix 8.1
Posts: 53

Rep: Reputation: 0
matrix of integers for a new C code


hello everybody.
this time I'm trying to plan ideas for a new code.
I'm going to post two simple drawing to try to explain my thoughts.

In the first drawing I have a 3x3(for example) grid on a plan (space 2) and the first problem to solve is to write a code to allow me to move back and forward from grid 3x3 to grid nxn (and keeping the position of the original points and get the positions of the new generated points); in practice in the first object (as example) I have 9 points and each one has his own (x,y); the second object has in:
the previous 9 points without alterations plus the (x,y) of the new points.

now pass this part i'd like to go from (space 2) to (space n) so next one in line would be a cube and so on. (please see the drawing).

next step (second drawing) let's suppose we fix n=2 (space 2); from (space 2) i'd like to create a third object where all the points presents in (space 2) "migrate" in a different position.(please see second drawing).

last step for this code would be the possibility to generate in same way the geodesics of the space image.

anyway, if someone (interested of course) have same ideas how I could approach the structure of this code would be a great help.
when I said approach I mean ideas like " if i was in you I use this or that" or "maybe a matrix of matrix with this structure or that structure as a element" or again "I have no idea but a cup of tea with a slice of cake at 5 pm may help you in another way".

so all ideas are welcome.
thank you all again.
follow the two drawing.
PS: sorry I have problem uploading the drawing; hope is clear enough what i try to achieve.
 
Old 08-29-2019, 06:39 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: MA, USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,010
Blog Entries: 13

Rep: Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451Reputation: 3451
I'd break it down to steps.

Store and validate a matrix. You're not describing a grid, you're describing nxn matrices. Design one or more methods to parse data, store, print, and diagnose nxm matrices of any size. Make all that as flexible and generic as you need, test the functions rigorously, and then proceed to a next step.

Copy matrix A to martrix B. Write utilities to copy from one matrix to another. Determine fault situations, such as what is impossible, or cases where data is to be lost. Also determine which rules you need to be flexible, such as what information to populate extra locations when you copy a smaller matrix into a larger one, or whether you will be dynamically allocating space for new matrices.

Stuff like that.
 
Old 08-29-2019, 08:20 PM   #3
sibelius
Member
 
Registered: Oct 2018
Location: Leura NSW Australia
Distribution: Linux Knoppix 8.1
Posts: 53

Original Poster
Rep: Reputation: 0
thank you very much for your help.
is a good start.
I'll see what I can do and I might leave this thread open while I'm proceeding whit this toy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
append integers until total is x integers razorcbl Linux - Newbie 7 03-12-2014 02:29 PM
[SOLVED] Parallel matrix - matrix multiplication seg-faults ejspeiro Programming 9 04-18-2011 09:41 PM
is there a matrix screensaver, very exactly like in the Matrix movie? frenchn00b Linux - Desktop 2 08-20-2009 10:00 AM
awk convert column matrix to square matrix? johnpaulodonnell Programming 4 04-30-2008 01:45 PM
free code for the "sparse matrix multiplicatino" ztdep Programming 2 04-01-2007 11:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration