Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

undirected-graph-typed

Package Overview
Dependencies
Maintainers
0
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

undirected-graph-typed

Undirected Graph. Javascript & Typescript Data Structure.

  • 1.54.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
139
decreased by-64.18%
Maintainers
0
Weekly downloads
 
Created
Source

NPM GitHub top language npm eslint npm bundle size npm bundle size npm

What

Brief

This is a standalone Undirected Graph data structure from the data-structure-typed collection. If you wish to access more data structures or advanced features, you can transition to directly installing the complete data-structure-typed package

How

install

npm

npm i undirected-graph-typed --save

yarn

yarn add undirected-graph-typed

snippet

API docs & Examples

API Docs

Live Examples

Examples Repository

Data Structures

Data StructureUnit TestPerformance TestAPI Docs
Undirected GraphUndirectedGraph

Standard library data structure comparison

Data Structure TypedC++ STLjava.utilPython collections
UndirectedGraph<V, E>---

Benchmark

Built-in classic algorithms

AlgorithmFunction DescriptionIteration Type
Graph DFSTraverse a graph in a depth-first manner, starting from a given node, exploring along one path as deeply as possible, and backtracking to explore other paths. Used for finding connected components, paths, etc. Recursion + Iteration
Graph BFSTraverse a graph in a breadth-first manner, starting from a given node, first visiting nodes directly connected to the starting node, and then expanding level by level. Used for finding shortest paths, etc. Recursion + Iteration
Graph Tarjan's AlgorithmFind strongly connected components in a graph, typically implemented using depth-first search.Recursion
Graph Bellman-Ford AlgorithmFinding the shortest paths from a single source, can handle negative weight edgesIteration
Graph Dijkstra's AlgorithmFinding the shortest paths from a single source, cannot handle negative weight edgesIteration
Graph Floyd-Warshall AlgorithmFinding the shortest paths between all pairs of nodesIteration
Graph getCyclesFind all cycles in a graph or detect the presence of cycles.Recursion
Graph getCutVertexesFind cut vertices in a graph, which are nodes that, when removed, increase the number of connected components in the graph. Recursion
Graph getSCCsFind strongly connected components in a graph, which are subgraphs where any two nodes can reach each other. Recursion
Graph getBridgesFind bridges in a graph, which are edges that, when removed, increase the number of connected components in the graph. Recursion
Graph topologicalSortPerform topological sorting on a directed acyclic graph (DAG) to find a linear order of nodes such that all directed edges go from earlier nodes to later nodes. Recursion

Software Engineering Design Standards

PrincipleDescription
PracticalityFollows ES6 and ESNext standards, offering unified and considerate optional parameters, and simplifies method names.
ExtensibilityAdheres to OOP (Object-Oriented Programming) principles, allowing inheritance for all data structures.
ModularizationIncludes data structure modularization and independent NPM packages.
EfficiencyAll methods provide time and space complexity, comparable to native JS performance.
MaintainabilityFollows open-source community development standards, complete documentation, continuous integration, and adheres to TDD (Test-Driven Development) patterns.
TestabilityAutomated and customized unit testing, performance testing, and integration testing.
PortabilityPlans for porting to Java, Python, and C++, currently achieved to 80%.
ReusabilityFully decoupled, minimized side effects, and adheres to OOP.
SecurityCarefully designed security for member variables and methods. Read-write separation. Data structure software does not need to consider other security aspects.
ScalabilityData structure software does not involve load issues.

Keywords

FAQs

Package last updated on 02 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc