登录
首页 » c++ » c++实现dijkstras算法

c++实现dijkstras算法

于 2023-08-23 发布 文件大小:300.20 kB
0 143
下载积分: 2 下载次数: 1

代码说明:

使用c++实现了dijkstra算法。代码工程使用clion编译运行通过。可以运行用户自行输入路径矩阵

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • iPhone-QQ-HeadPic
    Central Empire dedicated source
    2013-07-22 09:12:04下载
    积分:1
  • MATLAB7[1].02
    学习matlab的好资料第二部分,再此共享下啦。参考参考(Good information to learn the second part of matlab, and then under the shared friends. Reference Reference)
    2011-09-28 11:02:00下载
    积分:1
  • AD02
    stc12c5a60s2AD采样,两路,验证,可使用。(AD sampling)
    2013-08-10 09:11:59下载
    积分:1
  • 截屏软件代码
    【核心代码】//********************************************************************************//文件:Screenshot.CPP//作者:feiren//时间:2014-1-1//用途:封装截图功能的主窗口实现//版本:1.0.0.0//联系:feirench@gmail.com//********************************************************************************#include "stdafx.h"#include "Screenshot.h"#include "ShotImplement.h"extern TAppData g_Data;LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;bool         bClose    = false;int WINAPI ScreenshotWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,                    PSTR szCmdLine, int iCmdShow){    static TCHAR szAppName[] = TEXT ("AWin") ;    HWND         hwnd ;    MSG          msg ;    WNDCLASS     wndclass ;    BOOL         fMessage;    wndclass.style         = CS_CLASSDC | CS_DBLCLKS;    wndclass.lpfnWndProc   = WndProc ;    wndclass.cbClsExtra    = 0 ;    wndclass.cbWndExtra    = 0 ;    wndclass.hInstance     = hInstance ;    wndclass.hIcon         = LoadIcon (NULL, IDI_APPLICATION) ;    wndclass.hCursor       = LoadCursor (NULL, IDC_CROSS) ;    wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;    wndclass.lpszMenuName  = NULL ;    wndclass.lpszClassName = szAppName ;    g_Data.mResult = 0;    if (!RegisterClass (&wndclass))    {        return 0;    }    hwnd=CreateWindowEx(WS_EX_TOOLWINDOW,szAppName,TEXT ("The SH"),WS_POPUP|WS_VISIBLE,        CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,NULL,hInstance,NULL);    ShowWindow (hwnd, iCmdShow) ;    UpdateWindow (hwnd) ;    bClose = false;    PeekMessage(&msg, NULL, 0U, 0U, PM_NOREMOVE);    while(msg.message != WM_QUIT)    // 消息循环    {           fMessage = PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE);        if(fMessage)                //有消息        {             TranslateMessage(&msg);            DispatchMessage(&msg);        }else        {            if(bClose)break;            else Sleep(1);        }    }    UnregisterClass(szAppName,hInstance);    return g_Data.mResult ;    }LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){    HDC         hdc ;    PAINTSTRUCT ps ;    switch (message)    {            case WM_CREATE:          g_Data.Initialize(hwnd,GetModuleHandle(NULL));        return 0;    case WM_PAINT:        hdc = BeginPaint (hwnd, &ps) ;        //g_Data.OnPain(hdc);        EndPaint (hwnd, &ps) ;        return 0 ;    case WM_MOUSEMOVE:        hdc = GetDC(hwnd);        g_Data.OnMouseMove(hdc,wParam,lParam);        break;    case WM_LBUTTONDBLCLK:        hdc = GetDC(hwnd);        g_Data.OnLButtonDBLClick(hdc,wParam,lParam);        break;    case WM_LBUTTONDOWN:         hdc = GetDC(hwnd);        g_Data.OnLButtonDown(hdc,wParam,lParam);        break;// 鼠标左键按键,射击用    case WM_LBUTTONUP:             hdc = GetDC(hwnd);        g_Data.OnLButtonUp(hdc,wParam,lParam);        break;// 鼠标左键松开    case WM_RBUTTONDOWN:         hdc = GetDC(hwnd);        g_Data.OnRButtonDown(hdc,wParam,lParam);        break;// 鼠标右键按键,拖动对象用    case WM_RBUTTONUP:             hdc = GetDC(hwnd);        g_Data.OnRButtonUp(hdc,wParam,lParam);        break;// 鼠标右键松开    case WM_MOUSEWHEEL:          hdc = GetDC(hwnd);        g_Data.OnMouseWheel(hdc,wParam,lParam);        break;    case WM_KEYDOWN:                                hdc = GetDC(hwnd);        g_Data.OnKeyDown(hdc,wParam,lParam);        break;    case WM_KEYUP:                        // 按ESC退出        hdc = GetDC(hwnd);        g_Data.OnKeyUp(hdc,wParam,lParam);        break;    case WM_SETCURSOR:        g_Data.OnSetCursor();        break;    case WM_DESTROY:        g_Data.Release();            bClose = true;        //PostQuitMessage (0) ;        return 0 ;    default:        return DefWindowProc (hwnd, message, wParam, lParam) ;    }    return 0;}SCREENSHOT_API int fnScreenshot(void){    return ScreenshotWinMain(GetModuleHandle(NULL),NULL,NULL,SW_SHOWNORMAL|SW_MAXIMIZE);}
    2014-03-04下载
    积分:1
  • freeems-0.1.0-docs
    FreeEMS documentation
    2018-01-02 00:23:38下载
    积分:1
  • 3519AV100移植Qt5.5.1
    说明:  详细记录海思3519AV100移植QT5.5.1的步骤,以及如何配置环境变量,如何运行测试程序(Record in detail the steps of qt5.5.1 migration of Hisilicon 3519av100, how to configure the environment variables, and how to run the test program)
    2020-07-01 21:20:02下载
    积分:1
  • SMSAlarm
    这是一个短信报警的小程序,它通过ADO操作读取发送的短信号码和内容,自动发送短信并产生日志(This is a message warning of a small program that reads through the ADO operation number and content of messages sent automatically send text messages and generate the log)
    2009-10-13 08:53:22下载
    积分:1
  • love
    说明:  在窗口上显示爱心,可以自己换显示的元素,可以循环显示爱心(Show love on the window, you can change the displayed elements, you can loop show love)
    2020-06-17 18:40:01下载
    积分:1
  • 简单三层代码生成器
     
    2014-11-29下载
    积分:1
  • lesson1
    说明:  基于51单片机通信的其中一种,I2C总线通信。(I2C bus communication is one of 51 MCU communication.)
    2020-06-18 18:00:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载