Languages
[Edit]
EN

TypeScript - Chebyshev Distance function

0 points
Created by:
cory
1756

In this short article, we would like to show how to calculate Chebyshev Distance using TypeScript.

The universal distance formula is:

Where:

  • x and y are points in the space,
  • i is a number of dimensions.

The two-dimensional formula is:

The three-dimensional formula is:

    In simple words: Chebyshev Distance is the maximal positive distance between corresponding coordinates.

    Chebyshev Distance has applications in different fields, e.g. Artificial Intelligence.

    A practical example in 2D:

    Output:

    More complicated examples

    Edit

    In this section, you can find Chebyshev Distance examples for 3D and 4D.

    Output:

    See also

    Edit
    1. JavaScript - Chebyshev Distance function

    References

    Edit
    1. Chebyshev distance - Wikipedia

    Alternative titles

    1. TypeScript - Tchebychev distance function
    2. TypeScript - maximum metric function
    3. TypeScript - L infinity metric
    1
    Donate to Dirask
    Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
    Join to our subscribers to be up to date with content, news and offers.
    Native Advertising
    🚀
    Get your tech brand or product in front of software developers.
    For more information Contact us
    Dirask - we help you to
    solve coding problems.
    Ask question.

    ❤️💻 🙂

    Join