小编Eli*_*asz的帖子

如何在 Ruby 中展平数组?

在红宝石上。我有数组数组c = [["a"], ["b"]]

如何将其转换为 c = a + b

c = ["a", "b"]
Run Code Online (Sandbox Code Playgroud)

对于任何数组。也许可以不使用其他变量。里面的所有数组都没有展平。

d = [ [["a"], ["b"]], [["c"], ["d"]], [["e"], ["f"]] ] 
Run Code Online (Sandbox Code Playgroud)

我需要 [ [["a"], ["b"], ["c"], ["d"], ["e"], ["f"]] ]

ruby

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

如何在cgal上加入两个Polygon_with_holes_2

我有两个多边形(Polygon_with_holes_2)如何将它连接到多边形Polygon_with_holes_2

我需要一般解决方案.获取任何polygon_with_holes(或者如果没有空洞列表但仍然是polygon_with_holes结构),并将其与其他人连接并获取polygon_with_holes.如何检查方向(cgal不能加入,如果它不好),减少点等.如何使用良好的代码,没有内存泄漏.

c++ graphics cgal

6
推荐指数
0
解决办法
234
查看次数

标签 统计

c++ ×1

cgal ×1

graphics ×1

ruby ×1