mirror of
https://github.com/apple/swift-algorithms
synced 2026-11-22 04:10:39 +00:00
Also lets us use root instead of exp(log(x)/k), which is more accurate in some cases (but mainly is just nicer to read). The downside is that this introduces a dependency for Algorithms, where previously it had none. I think that Numerics is an OK thing to depend on (especially for these functions, which are available from 0.0.1), but it _is_ a _massive increase_ in the number of dependencies that the package has, and we should give that some thought.
36 lines
1.0 KiB
Swift
36 lines
1.0 KiB
Swift
// swift-tools-version:5.1
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift Algorithms open source project
|
|
//
|
|
// Copyright (c) 2020 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "swift-algorithms",
|
|
products: [
|
|
.library(
|
|
name: "Algorithms",
|
|
targets: ["Algorithms"]),
|
|
],
|
|
dependencies: [
|
|
.package(url: "https://github.com/apple/swift-numerics", from: "0.0.1"),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "Algorithms",
|
|
dependencies: [
|
|
.product(name: "RealModule", package: "swift-numerics"),
|
|
]),
|
|
.testTarget(
|
|
name: "SwiftAlgorithmsTests",
|
|
dependencies: ["Algorithms"]),
|
|
]
|
|
)
|