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

Recently participated in another online programming challenge at, 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


Lenore May 3 2021  11:55am
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 May 3 2021  11:59am
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

- Waiter, there's a fly in my soup!
- Don't worry, sir; the spider in your breadbasket will probably kill it.

6/6/22Solar Panel Page
12/18/21Solar Panel Efficiency
11/27/21Bug Fix 1
11/15/21Inhuman Humanism 1
8/16/21Jerry De Pyper is NOT on Facebook 1
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
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/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-2023 Gerald DePyper - Jinotega, Nicaragua, C.A.
rev. 2022.01.26