Skip to content

Rapatas/flat_matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flat Matrix

An Infinite Dimension Matrix, stored in a flattened state as an array for faster access.

Usage

flat_matrix<std::string> my_matrix(
	width,
	height,
	depth,
	time,
	universe_id,
	// anything
);

// Sequential Access
for (unsigned i = 0; i < my_matrix.size(); ++i) {
	my_matrix[i] = "Sad";
}

// Random Access
my_matrix(
	808,  // Width
	69,   // Height
	9000, // Depth
	1337, // Time
	42    // Universe ID
) = "Happy";

Installation

git clone https://github.com/Rapatas/flat_matrix
mkdir flat_matrix/build
cd flat_matrix/build
cmake ..
make install # As root

About

Flattened Infinite Dimension Matrix - C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages