mirror of https://github.com/KLayout/klayout.git
LayerMap#map and mmap with optional log layer
This commit is contained in:
parent
1f954d8758
commit
e7177261ad
|
|
@ -83,9 +83,13 @@ namespace gsi
|
|||
}
|
||||
|
||||
static void
|
||||
lm_map_string (db::LayerMap *layer_map, std::string &s, unsigned int l)
|
||||
lm_map_string (db::LayerMap *layer_map, std::string &s, int l)
|
||||
{
|
||||
layer_map->map_expr (s, l);
|
||||
if (l < 0) {
|
||||
layer_map->map_expr (s, layer_map->next_index ());
|
||||
} else {
|
||||
layer_map->map_expr (s, (unsigned int) l);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -113,9 +117,13 @@ namespace gsi
|
|||
}
|
||||
|
||||
static void
|
||||
lm_mmap_string (db::LayerMap *layer_map, std::string &s, unsigned int l)
|
||||
lm_mmap_string (db::LayerMap *layer_map, std::string &s, int l)
|
||||
{
|
||||
layer_map->mmap_expr (s, l);
|
||||
if (l < 0) {
|
||||
layer_map->mmap_expr (s, layer_map->next_index ());
|
||||
} else {
|
||||
layer_map->mmap_expr (s, (unsigned int) l);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -215,7 +223,7 @@ namespace gsi
|
|||
"\n"
|
||||
"This method has been added in version 0.20.\n"
|
||||
) +
|
||||
gsi::method_ext ("map", &lm_map_string, gsi::arg ("map_expr"), gsi::arg ("log_layer"),
|
||||
gsi::method_ext ("map", &lm_map_string, gsi::arg ("map_expr"), gsi::arg ("log_layer", -1),
|
||||
"@brief Maps a physical layer given by a string to a logical one\n"
|
||||
"@param map_expr The string describing the physical layer to map.\n"
|
||||
"@param log_layer The logical layer to which the physical layers are mapped.\n"
|
||||
|
|
@ -242,7 +250,9 @@ namespace gsi
|
|||
"For example, \"1-10/0: *+1/0\" will add 1 to the original layer number.\n"
|
||||
"\"1-10/0-50: * / *\" will use the original layers.\n"
|
||||
"\n"
|
||||
"Target mapping has been added in version 0.20.\n"
|
||||
"If the logical layer is negative or omitted, the method will select the next available one.\n"
|
||||
"\n"
|
||||
"Target mapping has been added in version 0.20. The logical layer is optional since version 0.28.\n"
|
||||
) +
|
||||
gsi::method_ext ("mmap", &lm_mmap, gsi::arg ("phys_layer"), gsi::arg ("log_layer"),
|
||||
"@brief Maps a physical layer to a logical one and adds to existing mappings\n"
|
||||
|
|
@ -280,14 +290,16 @@ namespace gsi
|
|||
"\n"
|
||||
"Multi-mapping has been added in version 0.27.\n"
|
||||
) +
|
||||
gsi::method_ext ("mmap", &lm_mmap_string, gsi::arg ("map_expr"), gsi::arg ("log_layer"),
|
||||
gsi::method_ext ("mmap", &lm_mmap_string, gsi::arg ("map_expr"), gsi::arg ("log_layer", -1),
|
||||
"@brief Maps a physical layer given by an expression to a logical one and adds to existing mappings\n"
|
||||
"\n"
|
||||
"This method acts like the corresponding 'map' method, but adds the logical layer to the receivers of the "
|
||||
"given physical one. Hence this method implements 1:n mapping capabilities.\n"
|
||||
"For backward compatibility, 'map' still substitutes mapping.\n"
|
||||
"\n"
|
||||
"Multi-mapping has been added in version 0.27.\n"
|
||||
"If the logical layer is negative or omitted, the method will select the next available one.\n"
|
||||
"\n"
|
||||
"Multi-mapping has been added in version 0.27. The logical layer is optional since version 0.28.\n"
|
||||
) +
|
||||
gsi::method_ext ("unmap", &lm_unmap, gsi::arg ("phys_layer"),
|
||||
"@brief Unmaps the given layer\n"
|
||||
|
|
@ -347,9 +359,9 @@ namespace gsi
|
|||
"\n"
|
||||
"@code"
|
||||
"lm = RBA::LayerMap::new\n"
|
||||
"lm.map(\"1/0-255 : ONE (1/0)\", 0)\n"
|
||||
"lm.map(\"2/0-255 : TWO (2/0)\", 1)\n"
|
||||
"lm.map(\"3/0-255 : THREE (3/0)\", 2)\n"
|
||||
"lm.map(\"1/0-255 : ONE (1/0)\")\n"
|
||||
"lm.map(\"2/0-255 : TWO (2/0)\")\n"
|
||||
"lm.map(\"3/0-255 : THREE (3/0)\")\n"
|
||||
"\n"
|
||||
"# read the layout using the layer map\n"
|
||||
"lo = RBA::LoadLayoutOptions::new\n"
|
||||
|
|
|
|||
|
|
@ -94,6 +94,157 @@ class DBLayerMapping_TestClass < TestBase
|
|||
|
||||
end
|
||||
|
||||
def test_2
|
||||
|
||||
lmap = RBA::LayerMap::new
|
||||
|
||||
lmap.map( "1/0", 0 )
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(1, 0)), true)
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(1, 1)), false)
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(2, 2)), false)
|
||||
lmap.map( "2/2", 0 )
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(2, 2)), true)
|
||||
lmap.map( "10/2", 0 )
|
||||
assert_equal( lmap.mapping_str(0), "1/0;2/2;10/2" )
|
||||
|
||||
lmap.map( "3/2", 1 )
|
||||
lmap.map( "2/2", 1 )
|
||||
lmap.map( "4/2", 1 )
|
||||
lmap.map( "1/2", 1 )
|
||||
lmap.map( "0/0", 1 )
|
||||
assert_equal( lmap.mapping_str(1), "0/0;1-4/2" ) # could be "0/0;1-4/2" as well ...
|
||||
|
||||
lmap.map( RBA::LayerInfo::new(2, 2), RBA::LayerInfo::new(4, 4), 2 )
|
||||
lmap.map( RBA::LayerInfo::new(0, 1), 2 )
|
||||
assert_equal( lmap.mapping_str(2), "0/1;2-4/2-4" )
|
||||
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(2, 4)), true )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 0)), true )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(2, 4)), 2 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(4, 2)), 2 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(1, 2)), 1 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(0, 0)), 1 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(100, 0)), -1 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(10, 2)), 0 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(1, 0)), 0 )
|
||||
|
||||
assert_equal( lmap.mapping(2).to_s, "2/2" )
|
||||
assert_equal( lmap.mapping(1).to_s, "1/2" )
|
||||
assert_equal( lmap.mapping(0).to_s, "10/2" )
|
||||
|
||||
lmap2 = lmap.dup
|
||||
|
||||
lmap.clear
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(2, 4)), false )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 0)), false )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(2, 4)), true )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 0)), true )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
assert_equal( lmap2.mapping(0).to_s, "10/2" )
|
||||
|
||||
lmap2.assign( lmap )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(2, 4)), false )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 0)), false )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
lmap = RBA::LayerMap::new
|
||||
lmap.map( "2/2:4/4", 0 )
|
||||
lmap.map( RBA::LayerInfo::new(0, 1), 2, RBA::LayerInfo::new(5, 5) )
|
||||
assert_equal( lmap.mapping_str(0), "2/2 : 4/4" )
|
||||
assert_equal( lmap.mapping(0).to_s, "4/4" )
|
||||
assert_equal( lmap.mapping(2).to_s, "5/5" )
|
||||
|
||||
lmap = RBA::LayerMap::new
|
||||
|
||||
lmap.map("*/*", 0)
|
||||
lmap.unmap(RBA::LayerInfo::new(5, 10))
|
||||
assert_equal(lmap.mapping_str(0), "0-4/*;5/0-9,11-*;6-*/*")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.unmap(RBA::LayerInfo::new(5, 10), RBA::LayerInfo::new(16, 21))
|
||||
assert_equal(lmap.mapping_str(0), "0-4/*;5-16/0-9,22-*;17-*/*")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.unmap("5-16/10-21")
|
||||
assert_equal(lmap.mapping_str(0), "0-4/*;5-16/0-9,22-*;17-*/*")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), 1)
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5/10")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), 1, RBA::LayerInfo::new(100, 0))
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5/10 : 100/0")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), RBA::LayerInfo::new(16, 21), 1)
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-21")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), RBA::LayerInfo::new(16, 21), 1, RBA::LayerInfo::new(100, 0))
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-21 : 100/0")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap("5-16/10-21", 1)
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-21")
|
||||
|
||||
assert_equal(lmap.logicals(RBA::LayerInfo::new(5, 10)), [ 0, 1 ])
|
||||
assert_equal(lmap.logicals(RBA::LayerInfo::new(0, 10)), [ 0 ])
|
||||
|
||||
# optional log layer
|
||||
lmap.clear
|
||||
lmap.map("*/*")
|
||||
lmap.mmap("5-16/10-22")
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-22")
|
||||
|
||||
end
|
||||
|
||||
def test_3
|
||||
|
||||
# LayerMap tests
|
||||
lm = RBA::LayerMap.new
|
||||
lm.map("1-10/5-20", 0)
|
||||
lm.map("3/0", 1)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(0, 0)), false)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 0)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 1)), false)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 5)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 20)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(1, 5)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(1, 20)), true)
|
||||
assert_equal(lm.mapping_str(1), "3/0")
|
||||
assert_equal(lm.mapping(1).to_s, "3/0")
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 0)), 1)
|
||||
|
||||
lm.clear
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 0)), false)
|
||||
lm.map(RBA::LayerInfo.new(3, 0), 2)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 0)), 2)
|
||||
|
||||
lm.map(RBA::LayerInfo.new(1, 0), RBA::LayerInfo.new(10, 10), 1)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 0)), 1)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 3)), 1)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(1, 3)), 1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
load("test_epilogue.rb")
|
||||
|
|
|
|||
|
|
@ -27,122 +27,6 @@ class DBLayoutTests1_TestClass < TestBase
|
|||
|
||||
def test_1
|
||||
|
||||
lmap = RBA::LayerMap::new
|
||||
|
||||
lmap.map( "1/0", 0 )
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(1, 0)), true)
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(1, 1)), false)
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(2, 2)), false)
|
||||
lmap.map( "2/2", 0 )
|
||||
assert_equal(lmap.is_mapped(RBA::LayerInfo::new(2, 2)), true)
|
||||
lmap.map( "10/2", 0 )
|
||||
assert_equal( lmap.mapping_str(0), "1/0;2/2;10/2" )
|
||||
|
||||
lmap.map( "3/2", 1 )
|
||||
lmap.map( "2/2", 1 )
|
||||
lmap.map( "4/2", 1 )
|
||||
lmap.map( "1/2", 1 )
|
||||
lmap.map( "0/0", 1 )
|
||||
assert_equal( lmap.mapping_str(1), "0/0;1-4/2" ) # could be "0/0;1-4/2" as well ...
|
||||
|
||||
lmap.map( RBA::LayerInfo::new(2, 2), RBA::LayerInfo::new(4, 4), 2 )
|
||||
lmap.map( RBA::LayerInfo::new(0, 1), 2 )
|
||||
assert_equal( lmap.mapping_str(2), "0/1;2-4/2-4" )
|
||||
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(2, 4)), true )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 0)), true )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(2, 4)), 2 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(4, 2)), 2 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(1, 2)), 1 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(0, 0)), 1 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(100, 0)), -1 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(10, 2)), 0 )
|
||||
assert_equal( lmap.logical(RBA::LayerInfo::new(1, 0)), 0 )
|
||||
|
||||
assert_equal( lmap.mapping(2).to_s, "2/2" )
|
||||
assert_equal( lmap.mapping(1).to_s, "1/2" )
|
||||
assert_equal( lmap.mapping(0).to_s, "10/2" )
|
||||
|
||||
lmap2 = lmap.dup
|
||||
|
||||
lmap.clear
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(2, 4)), false )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 0)), false )
|
||||
assert_equal( lmap.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(2, 4)), true )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 0)), true )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
assert_equal( lmap2.mapping(0).to_s, "10/2" )
|
||||
|
||||
lmap2.assign( lmap )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(2, 4)), false )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 0)), false )
|
||||
assert_equal( lmap2.is_mapped?(RBA::LayerInfo::new(0, 100)), false )
|
||||
|
||||
lmap = RBA::LayerMap::new
|
||||
lmap.map( "2/2:4/4", 0 )
|
||||
lmap.map( RBA::LayerInfo::new(0, 1), 2, RBA::LayerInfo::new(5, 5) )
|
||||
assert_equal( lmap.mapping_str(0), "2/2 : 4/4" )
|
||||
assert_equal( lmap.mapping(0).to_s, "4/4" )
|
||||
assert_equal( lmap.mapping(2).to_s, "5/5" )
|
||||
|
||||
lmap = RBA::LayerMap::new
|
||||
|
||||
lmap.map("*/*", 0)
|
||||
lmap.unmap(RBA::LayerInfo::new(5, 10))
|
||||
assert_equal(lmap.mapping_str(0), "0-4/*;5/0-9,11-*;6-*/*")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.unmap(RBA::LayerInfo::new(5, 10), RBA::LayerInfo::new(16, 21))
|
||||
assert_equal(lmap.mapping_str(0), "0-4/*;5-16/0-9,22-*;17-*/*")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.unmap("5-16/10-21")
|
||||
assert_equal(lmap.mapping_str(0), "0-4/*;5-16/0-9,22-*;17-*/*")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), 1)
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5/10")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), 1, RBA::LayerInfo::new(100, 0))
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5/10 : 100/0")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), RBA::LayerInfo::new(16, 21), 1)
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-21")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap(RBA::LayerInfo::new(5, 10), RBA::LayerInfo::new(16, 21), 1, RBA::LayerInfo::new(100, 0))
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-21 : 100/0")
|
||||
|
||||
lmap.clear
|
||||
lmap.map("*/*", 0)
|
||||
lmap.mmap("5-16/10-21", 1)
|
||||
assert_equal(lmap.mapping_str(0), "+*/*")
|
||||
assert_equal(lmap.mapping_str(1), "+5-16/10-21")
|
||||
|
||||
assert_equal(lmap.logicals(RBA::LayerInfo::new(5, 10)), [ 0, 1 ])
|
||||
assert_equal(lmap.logicals(RBA::LayerInfo::new(0, 10)), [ 0 ])
|
||||
|
||||
end
|
||||
|
||||
def test_2
|
||||
|
||||
# LayerInfo tests
|
||||
l1 = RBA::LayerInfo::new
|
||||
assert_equal(l1.to_s, "")
|
||||
|
|
@ -170,7 +54,7 @@ class DBLayoutTests1_TestClass < TestBase
|
|||
|
||||
end
|
||||
|
||||
def test_3
|
||||
def test_2
|
||||
|
||||
ly = RBA::Layout.new
|
||||
ly.read(ENV["TESTSRC"] + "/testdata/gds/t10.gds")
|
||||
|
|
@ -269,34 +153,6 @@ class DBLayoutTests1_TestClass < TestBase
|
|||
|
||||
end
|
||||
|
||||
def test_4
|
||||
|
||||
# LayerMap tests
|
||||
lm = RBA::LayerMap.new
|
||||
lm.map("1-10/5-20", 0)
|
||||
lm.map("3/0", 1)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(0, 0)), false)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 0)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 1)), false)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 5)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 20)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(1, 5)), true)
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(1, 20)), true)
|
||||
assert_equal(lm.mapping_str(1), "3/0")
|
||||
assert_equal(lm.mapping(1).to_s, "3/0")
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 0)), 1)
|
||||
|
||||
lm.clear
|
||||
assert_equal(lm.is_mapped?(RBA::LayerInfo.new(3, 0)), false)
|
||||
lm.map(RBA::LayerInfo.new(3, 0), 2)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 0)), 2)
|
||||
|
||||
lm.map(RBA::LayerInfo.new(1, 0), RBA::LayerInfo.new(10, 10), 1)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 0)), 1)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(3, 3)), 1)
|
||||
assert_equal(lm.logical(RBA::LayerInfo.new(1, 3)), 1)
|
||||
end
|
||||
|
||||
def collect(s, l)
|
||||
|
||||
res = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue