mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-25 17:36:26 -05:00
Adds new files for Cauchy RAID.
This commit is contained in:
parent
9a5978eb22
commit
d371fec14f
5 changed files with 273 additions and 0 deletions
111
combos.h
Normal file
111
combos.h
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* Copyright (C) 2013 Andrea Mazzoleni
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Combinations of 6 elements.
|
||||
* Ends is marked with first element as -1.
|
||||
*/
|
||||
static int combo[][32][8] = {
|
||||
/* combinations of 1 of 6 elements */
|
||||
{
|
||||
{ 0 },
|
||||
{ 1 },
|
||||
{ 2 },
|
||||
{ 3 },
|
||||
{ 4 },
|
||||
{ 5 },
|
||||
{ -1 }
|
||||
},
|
||||
/* combinations of 2 of 6 elements */
|
||||
{
|
||||
{ 0, 1 },
|
||||
{ 0, 2 },
|
||||
{ 0, 3 },
|
||||
{ 0, 4 },
|
||||
{ 0, 5 },
|
||||
{ 1, 2 },
|
||||
{ 1, 3 },
|
||||
{ 1, 4 },
|
||||
{ 1, 5 },
|
||||
{ 2, 3 },
|
||||
{ 2, 4 },
|
||||
{ 2, 5 },
|
||||
{ 3, 4 },
|
||||
{ 3, 5 },
|
||||
{ 4, 5 },
|
||||
{ -1 }
|
||||
},
|
||||
/* combinations of 3 of 6 elements */
|
||||
{
|
||||
{ 0, 1, 2 },
|
||||
{ 0, 1, 3 },
|
||||
{ 0, 1, 4 },
|
||||
{ 0, 1, 5 },
|
||||
{ 0, 2, 3 },
|
||||
{ 0, 2, 4 },
|
||||
{ 0, 2, 5 },
|
||||
{ 0, 3, 4 },
|
||||
{ 0, 3, 5 },
|
||||
{ 0, 4, 5 },
|
||||
{ 1, 2, 3 },
|
||||
{ 1, 2, 4 },
|
||||
{ 1, 2, 5 },
|
||||
{ 1, 3, 4 },
|
||||
{ 1, 3, 5 },
|
||||
{ 1, 4, 5 },
|
||||
{ 2, 3, 4 },
|
||||
{ 2, 3, 5 },
|
||||
{ 2, 4, 5 },
|
||||
{ 3, 4, 5 },
|
||||
{ -1 }
|
||||
},
|
||||
/* combinations of 4 of 6 elements */
|
||||
{
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 0, 1, 2, 4 },
|
||||
{ 0, 1, 2, 5 },
|
||||
{ 0, 1, 3, 4 },
|
||||
{ 0, 1, 3, 5 },
|
||||
{ 0, 1, 4, 5 },
|
||||
{ 0, 2, 3, 4 },
|
||||
{ 0, 2, 3, 5 },
|
||||
{ 0, 2, 4, 5 },
|
||||
{ 0, 3, 4, 5 },
|
||||
{ 1, 2, 3, 4 },
|
||||
{ 1, 2, 3, 5 },
|
||||
{ 1, 2, 4, 5 },
|
||||
{ 1, 3, 4, 5 },
|
||||
{ 2, 3, 4, 5 },
|
||||
{ -1 }
|
||||
},
|
||||
/* combinations of 5 of 6 elements */
|
||||
{
|
||||
{ 0, 1, 2, 3, 4 },
|
||||
{ 0, 1, 2, 3, 5 },
|
||||
{ 0, 1, 2, 4, 5 },
|
||||
{ 0, 1, 3, 4, 5 },
|
||||
{ 0, 2, 3, 4, 5 },
|
||||
{ 1, 2, 3, 4, 5 },
|
||||
{ -1 }
|
||||
},
|
||||
/* combinations of 6 of 6 elements */
|
||||
{
|
||||
{ 0, 1, 2, 3, 4, 5 },
|
||||
{ -1 }
|
||||
},
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue