MCPcopy Create free account
hub / github.com/TheAlgorithms/JavaScript / iterate

Function iterate

Recursive/KochSnowflake.js:84–91  ·  view source on GitHub ↗
(initialVectors, steps)

Source from the content-addressed store, hash-verified

82 * @returns The transformed vectors after the iteration-steps.
83 */
84export function iterate(initialVectors, steps) {
85 let vectors = initialVectors
86 for (let i = 0; i < steps; i++) {
87 vectors = iterationStep(vectors)
88 }
89
90 return vectors
91}
92
93/**
94 * Loops through each pair of adjacent vectors.

Callers 4

getKochSnowflakeFunction · 0.90
iteratorMethod · 0.85
iteratorMethod · 0.85

Calls 1

iterationStepFunction · 0.85

Tested by

no test coverage detected