小编rke*_*dge的帖子

删除Git lfs链接到文件并直接添加到git

我需要删除 Git LFS 文件指针,并将文件直接添加到 Git。

我在 .gitattributes 中有一个过滤器来匹配某些文件:

test/**/*.py filter=lfs diff=lfs merge=lfs -text
Run Code Online (Sandbox Code Playgroud)

如何修改它以从此模式中排除 1 个文件?

我尝试过这样的事情:

test/**/*.py !test/my_dir/my_file.py filter=lfs diff=lfs merge=lfs -text
Run Code Online (Sandbox Code Playgroud)

但它似乎不起作用...git说没有这样的文件

git gitattributes git-lfs

2
推荐指数
1
解决办法
1893
查看次数

图连接算法中查找邻居节点

我正在研究路径查找问题。我有一个由均匀分布的节点组成的二维网格。我需要一种算法来查找每个节点的所有 8 个邻居(如果存在),以便我可以找到所有邻居连接。

我知道如何做到这一点的唯一方法是这样的:

for each node
 for every other node
     check position to find if it is neighboring if so add it to the nodes connection list
Run Code Online (Sandbox Code Playgroud)

我担心这会非常低效O(n^2),我想有更好的方法来解决它。

任何帮助都会很棒!

algorithm graph nodes data-structures

1
推荐指数
1
解决办法
1798
查看次数

标签 统计

algorithm ×1

data-structures ×1

git ×1

git-lfs ×1

gitattributes ×1

graph ×1

nodes ×1