public static function getUniqueSubsetPatterns($cardinality) {
		$uniqueOnes = array();

		$powerset = pow(2, $cardinality);
		$possibilities = array();
		for ($i=0; $i<$powerset; $i++) {
			$possibilities[$i] = true; // true means it's a pattern that needs to be tested
		}

		// get the next true one
		while (count($possibilities) > 0) {
			$next = array_search(true, $possibilities, true);

			$uniqueOnes[] = $next;

			// remove it and all its rotations from the set
			$allRotations = \ianring\BitmaskUtils::allRotationsOf($next, $cardinality);
			foreach ($allRotations as $rot) {
				unset($possibilities[$rot]);
			}
		}

		return $uniqueOnes;
	}
public static function getUniqueSubsetPatterns($cardinality) {
		$uniqueOnes = array();

		$powerset = pow(2, $cardinality);
		$possibilities = array();
		for ($i=0; $i<$powerset; $i++) {
			$possibilities[$i] = true; // true means it's a pattern that needs to be tested
		}

		// get the next true one
		while (count($possibilities) > 0) {
			$next = array_search(true, $possibilities, true);

			$uniqueOnes[] = $next;

			// remove it and all its rotations from the set
			$allRotations = \ianring\BitmaskUtils::allRotationsOf($next, $cardinality);
			foreach ($allRotations as $rot) {
				unset($possibilities[$rot]);
			}
		}

		return $uniqueOnes;
	}
public static function getUniqueSubsetPatterns ( $ cardinality ) { $ uniqueOnes = array ( ) ; $ powerset = pow ( 2 , $ cardinality ) ; $ possibilities = array ( ) ; for ( $ i = 0 ; $ i < $ powerset ; $ i ++ ) { $ possibilities [ $ i ] = true ; // true means it's a pattern that needs to be tested } // get the next true one while ( count ( $ possibilities ) > 0 ) { $ next = array_search ( true , $ possibilities , true ) ; $ uniqueOnes [ ] = $ next ; // remove it and all its rotations from the set $ allRotations = \ ianring \ BitmaskUtils :: allRotationsOf ( $ next , $ cardinality ) ; foreach ( $ allRotations as $ rot ) { unset ( $ possibilities [ $ rot ] ) ; } } return $ uniqueOnes ; }
This one creates all the different patterns that can be made from a set of X things, omitting any that are duplicates
by rotation. This is the set of patterns that we look at to compute all the different cases for cardinaltiyEqualsVariety.

@param  [type] $set [description]
@return [type]      [description]
This one creates all the different patterns that can be made from a set of X things omitting any that are duplicates by rotation . This is the set of patterns that we look at to compute all the different cases for cardinaltiyEqualsVariety .