mirror of
https://github.com/jkl1337/SwiftPFFFT.git
synced 2026-01-02 03:34:31 -06:00
rename buffer mutating methods
This commit is contained in:
@@ -36,7 +36,7 @@ public struct Buffer<T>: ~Copyable {
|
|||||||
try buffer.map(transform)
|
try buffer.map(transform)
|
||||||
}
|
}
|
||||||
|
|
||||||
@inlinable public func mutateEach(_ body: (Int, inout T) throws -> Void) rethrows {
|
@inlinable public func mapInPlace(_ body: (Int, inout T) throws -> Void) rethrows {
|
||||||
for i in 0 ..< buffer.count {
|
for i in 0 ..< buffer.count {
|
||||||
try body(i, &buffer[i])
|
try body(i, &buffer[i])
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ public protocol ComplexType {
|
|||||||
extension Complex: ComplexType {}
|
extension Complex: ComplexType {}
|
||||||
|
|
||||||
public extension Buffer where T: ComplexType {
|
public extension Buffer where T: ComplexType {
|
||||||
@inlinable public func mutateEachSwapLast(_ body: (Int, inout T) throws -> Void) rethrows {
|
@inlinable func mapInPlaceSwapLast(_ body: (Int, inout T) throws -> Void) rethrows {
|
||||||
for i in 0 ..< buffer.count {
|
for i in 0 ..< buffer.count {
|
||||||
try body(i, &buffer[i])
|
try body(i, &buffer[i])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user