求次短路徑……修改 Dijkstra,不只記錄到各點的最短距離(d[i]
),還記錄次短距離(sd[i]
)
實作上有幾點要注意( 不確定這樣想對不對… ):
求次短路徑……修改 Dijkstra,不只記錄到各點的最短距離(d[i]
),還記錄次短距離(sd[i]
)
實作上有幾點要注意( 不確定這樣想對不對… ):
文章節錄、翻譯、改寫自 這
3, 4, 5
顆。def boxes_iou(boxesA, boxesB): | |
boxesA = boxesA.astype(float) | |
boxesB = boxesB.astype(float) | |
boxesA[:, 2:] += boxesA[:, :2] | |
boxesB[:, 2:] += boxesB[:, :2] | |
N, M = len(boxesA), len(boxesB) | |
boxesA = np.broadcast_to(boxesA.reshape(N, 1, 4), (N, M, 4)) | |
boxesB = np.broadcast_to(boxesB.reshape(1, M, 4), (N, M, 4)) | |
x1 = np.maximum(boxesA[..., 0], boxesB[..., 0]) |
#include "../Externals/Include/Include.h" | |
#include "Object.hpp" | |
#define sz(x) (int(x.size())) | |
using namespace glm; | |
using namespace std; | |
#define SHADOW_MAP_SIZE 2048 | |
Object quad; |
#version 410 core | |
uniform sampler2D tex0; | |
uniform sampler2D tex1; | |
uniform sampler2D tex2; | |
out vec4 color; | |
in VS_OUT | |
{ |
#version 410 | |
layout(location = 0) out vec4 fragColor; | |
uniform mat4 um4mv; | |
uniform mat4 um4p; | |
in VertexData | |
{ | |
vec3 N; // eye space normal |
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: | |
# export SYSTEMD_PAGER= |
並查集經典題。 並查集要記得 init 啊
[Desktop Entry] | |
Type=Application | |
Encoding=UTF-8 | |
Name=Mouse Button Remap | |
Comment=Exchanging Mouse Right & Middle Button | |
Exec=sh -c "xinput set-button-map $(xinput list --id-only 'pointer:Logitech USB Receiver') 1 3 2" | |
Terminal=false |