Jerry's Blog  1.4.230
mi propio
Data Rings
Data arrays without beginning nor end
Fri April 30 2021  10:33amComputer

Recently participated in another online programming challenge at linuxquestions.org, and ended up learning a new (for me) programming concept.

In a typical database operation, the data are accessed and processed as individual values, or as single- or multi-dimensional arrays. The array has a defined beginning and end, and is usually processed forward from beginning to end. Not so with data rings, which are conceptualized as circular arrays, with no definite start or end points. The data are still stored in memory and on disk in a linear manner (the computer knows nothing of circles or rings), but the program or operation accesses the data in a circular manner.

The image represents in pictoral form one such data ring. The unique trait of this particular ring is that it consists of the numbers 1 through 32 with no repetition, and that each pair of adjacent numbers when added together equals a perfect square number. This is the case regardless of which point you start processing, and regardless of which direction you take, clockwise or counter-clockwise. So this datum is best treated as a ring, or circular array, of numbers.

Data rings could take many forms. Some might be of a static and unalterable size; others may allow the addition and removal of elements. Some rings might allow processing in either direction; others may facilitate either forward (clockwise) or backward (counter-clockwise) processing, but not both. Its elements may be numeric data, textual data, complex structures, or even more data rings. The data ring pictured contains simple integers, is static both as to its size and its contents, and is bi-directional.

The C++ header file 'DataRing.h', defines a data ring class along with structures, definitions, and functions, which you may download and include in your own C++ program. It currently treats of data rings of any static size whose elements are integers, and allows bi-directional processing. As with other CyberJerry stuff it is free software under the GNU General Public License version 3. The terms of this license can be found -> here.

  
previous article: Improbable Chess Graphics

2 comments:

Lenore Mon May 3  11:55am
L
only ring i am concerned about is the one on my finger and to stay true to the vows it signifies. a true ring of love, not numbers.L
Lenore Mon May 3  11:59am
L
only ring i am concerned about is the one on my finger and to stay true to the vows it signifies. a true ring of love, not numbers.L

 
To be content with little is difficult.
To be content with much is impossible.

Articles
All  
Faith/Philosophy
Sudoku
Computer
Misc.
4/30/21Data Rings  2
3/3/21Improbable Chess Graphics
1/30/21Solar Panel 2
11/24/20Ode to Sudoku
10/7/20Version 3
8/23/20Successful Challenger 2
8/5/20Ordinariate
7/30/20Amateur Priests 1
7/23/20Doctrines, Canons, Buildings 1
7/6/204 Sudoku Challenges
6/19/20Unavoidable Rectangle
6/1/20Sudoku Challenge (2) 1
4/7/20Fear of Death 3
2/14/20Heads Up
1/11/20Billionth Birthsecond 1
12/31/19Versus-2 1
12/18/19Versus
12/3/19Copyright/left 2
10/24/19DePyper 1
7/19/19Schizophrenia 4
7/11/19New Math 1
6/2/19Times and Seasons 4
11/29/18Data Security 1
10/2/18Until 7
9/15/18Empty Chair 11
8/28/18Riddle me this 6
8/1/18Sudoku Challenge Answered 3
7/4/18Unrest in Nicaragua 7
5/9/18Some Specifics
4/20/18Crisis of Authority 4
3/17/18Theocracy 2
3/1/18Self abnegation 1
12/14/17Sudoku Challenge
12/2/17Blog End
11/16/17Meta Blog 6
Copyright (c) 2017-2021 Gerald DePyper - Jinotega, Nicaragua, C.A.
rev. 2021.03.21