Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,17 +0,0 @@
|
|||
#Create generator of extended fibonaci
|
||||
Function Get-ExtendedFibonaciGenerator($InitialValues ){
|
||||
$Values = $InitialValues
|
||||
{
|
||||
#exhaust initial values first before calculating next values by summation
|
||||
if ($InitialValues.Length -gt 0) {
|
||||
$NextValue = $InitialValues[0]
|
||||
$Script:InitialValues = $InitialValues | Select -Skip 1
|
||||
return $NextValue
|
||||
}
|
||||
|
||||
$NextValue = $Values | Measure-Object -Sum | Select -ExpandProperty Sum
|
||||
$Script:Values = @($Values | Select-Object -Skip 1) + @($NextValue)
|
||||
|
||||
$NextValue
|
||||
}.GetNewClosure()
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
$Name = 'fibo tribo tetra penta hexa hepta octo nona deca'.Split()
|
||||
0..($Name.Length-1) | foreach { $Index = $_
|
||||
$InitialValues = @(1) + @(foreach ($I In 0..$Index) { [Math]::Pow(2,$I) })
|
||||
$Generator = Get-ExtendedFibonaciGenerator $InitialValues
|
||||
[PSCustomObject] @{
|
||||
n = $InitialValues.Length;
|
||||
Name = "$($Name[$Index])naci";
|
||||
Sequence = 1..15 | foreach { & $Generator } | Join-String -Separator ','
|
||||
}
|
||||
} | Format-Table -AutoSize
|
||||
Loading…
Add table
Add a link
Reference in a new issue