Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: IntervalComplement

  • To: mathgroup at
  • Subject: [mg70324] Re: IntervalComplement
  • From: Bill Rowe <readnewsciv at>
  • Date: Fri, 13 Oct 2006 01:30:07 -0400 (EDT)

On 10/12/06 at 5:38 AM, chris at (Chris Chiasson) wrote:

>Has anyone implemented this function before? I need something that
>can do this.

Hmm... One way to interpret what you have asked for is a 
function that returns a list of intervals containing all points 
not contained by the intervals returned by IntervalUnion. Using 
that as the function definition then IntervalComplement could be 
written as:

IntervalComplement[int___Interval] :=
   ({Interval[{-Infinity, Min[#1]}],
      Interval[{Max[#1], Infinity}]} & )[
    Flatten[Apply[List, {int}, {1}]]]



{Interval[{-Infinity, 1}], Interval[{30, Infinity}]}

seems to work correctly. But this result doesn't seem useful to 
me which leads me to believe I don't really understand what you 
are asking for.
To reply via email subtract one hundred and four

  • Prev by Date: Re: sample programs
  • Next by Date: Re: IntervalComplement
  • Previous by thread: Re: IntervalComplement
  • Next by thread: Re: Re: IntervalComplement