https://github.com/pratikpc/formula1-six-degree-graph-util
Added Code to Design and List Graphs Between Multiple Nodes
https://github.com/pratikpc/formula1-six-degree-graph-util
Last synced: about 1 year ago
JSON representation
Added Code to Design and List Graphs Between Multiple Nodes
- Host: GitHub
- URL: https://github.com/pratikpc/formula1-six-degree-graph-util
- Owner: pratikpc
- Created: 2020-08-24T16:13:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-10T06:55:39.000Z (over 2 years ago)
- Last Synced: 2025-06-22T13:03:44.662Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Formula One Graph Names
## Website [https://pratikpc.github.io/six-degree-f1/](https://pratikpc.github.io/six-degree-f1/)
[](https://opensource.org/licenses/MIT) [](http://www.typescriptlang.org/) [](https://github.com/prettier/prettier)
Graph Operations utilised by the website to parse JSON and Abstract processing
```ts
import Graph from 'formula-one-six-degree-graph-util';
console.log(Graph.GetDriverName('5'));
const graph = new Graph();
graph.CalculateDistancesBetweenAllElements({ cache: true });
console.log(graph.GetSixDegreesOfFreedomInMainComponent());
console.log(
'Closest between 1950 and 2020',
Graph.GetDriverName(graph.GetClosestDriverPairingBetweenSeasons(1950, 2020))
);
console.log(
Graph.GetDriverName(graph.GetClosestTeamPairing('mclaren', 'lotus'))
);
console.log(
Graph.GetDriverName(
graph.GetClosestTeamAndDriverPairing('mclaren', 'kimi-raikkonen')
)
);
console.log('Farthest');
console.log(
Graph.GetDriverName(graph.GetFarthestDriverPairingBetweenSeasons(1950, 2020))
);
console.log(
Graph.GetDriverName(graph.GetFarthestTeamPairing('mclaren', 'lotus'))
);
console.log(
Graph.GetDriverName(
graph.GetClosestTeamAndDriverPairing('mclaren', 'kimi-raikkonen')
)
);
```