mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
SET_BASE - cmpleted GetSetComplement
This commit is contained in:
parent
c0a558e229
commit
f70180eb66
@ -308,17 +308,14 @@ do -- SET_BASE
|
|||||||
-- @return Core.Set#SET_BASE The set of objects that are in set *B* but **not** in this set *A*.
|
-- @return Core.Set#SET_BASE The set of objects that are in set *B* but **not** in this set *A*.
|
||||||
function SET_BASE:GetSetComplement(SetB)
|
function SET_BASE:GetSetComplement(SetB)
|
||||||
|
|
||||||
local complement=SET_BASE:New()
|
local complement = self:GetSetUnion(SetB)
|
||||||
|
local intersection = self:GetSetIntersection(SetB)
|
||||||
|
|
||||||
local union=self:GetSetUnion(SetA, SetB)
|
for _,Object in pairs(intersection.Set) do
|
||||||
|
complement:Remove(Object.ObjectName,true)
|
||||||
for _,Object in pairs(union.Set) do
|
|
||||||
if SetA:IsIncludeObject(Object) and SetB:IsIncludeObject(Object) then
|
|
||||||
intersection:Add(intersection)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return intersection
|
return complement
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user