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

 
I really only need to know two things:
 1. There is a God.
 2. It ain't me.

Articles
All  
Faith/Philosophy
Sudoku
Computer
Misc.
4/30/21Data Rings  2
3/3/21Improbable Chess Graphics
1/11/20Billionth Birthsecond 1
12/3/19Copyright/left 2
7/11/19New Math 1
11/29/18Data Security 1
12/2/17Blog End
11/16/17Meta Blog 6
Copyright (c) 2017-2021 Gerald DePyper - Jinotega, Nicaragua, C.A.
rev. 2021.03.21