From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.devel Subject: Re: Overlays as an AA-tree Date: Fri, 03 Feb 2017 16:02:24 +0100 Message-ID: <87fujv5ncv.fsf@hochschule-trier.de> References: <87d1jylv43.fsf@fastmail.com> <87fujv64mn.fsf@hochschule-trier.de> <87fujvpkzc.fsf@fastmail.com> <87vasr5tqd.fsf@hochschule-trier.de> <877f57pdne.fsf@fastmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486134278 4865 195.159.176.226 (3 Feb 2017 15:04:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2017 15:04:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: emacs-devel@gnu.org To: Joakim Jalap Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 03 16:04:34 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZfPd-00013w-Qn for ged-emacs-devel@m.gmane.org; Fri, 03 Feb 2017 16:04:33 +0100 Original-Received: from localhost ([::1]:35203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZfPh-0000q2-Rx for ged-emacs-devel@m.gmane.org; Fri, 03 Feb 2017 10:04:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZfPX-0000oa-72 for emacs-devel@gnu.org; Fri, 03 Feb 2017 10:04:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZfPT-0005fF-5s for emacs-devel@gnu.org; Fri, 03 Feb 2017 10:04:27 -0500 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:35533) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZfPS-0005eu-Rg for emacs-devel@gnu.org; Fri, 03 Feb 2017 10:04:23 -0500 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdfbc.dynamic.kabel-deutschland.de [95.91.223.188]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 33C34179AAE7; Fri, 3 Feb 2017 16:02:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1486134145; bh=XN3+22MvOn2Hmy1jPTPOF6AZ8mA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=BZcyGTk4sB053emHDhEokmSMC6XfBNsUGCTM22+/OybOU2iQ4ElIR957VVVSg84/f phlKxF5MftPzSeCu/xkVsrweyOMKnj6j7JYqI5CZuJkUY0j3Qep31kylXppRPJf3VN a7KzGPrq/UiqHpQXlZ506BWs3CILaEiJfxpK6xNo= In-Reply-To: <877f57pdne.fsf@fastmail.com> (Joakim Jalap's message of "Fri, 03 Feb 2017 15:11:49 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 143.93.54.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211931 Archived-At: Joakim Jalap writes: > Hm, that is true... I think I actually started like that, but then got > stuck in the mindset of having a total ordering. No you're right, the comparison function needs to implement a total ordering, but this just means, simply put, that any pair of nodes x, y needs to be comparable, i.e. x <= y OR y <= x . But this does not exclude the case where both these statements are true, i.e. x = y. > So, will there be a linked list in each node for the overlays, or how > will it work? Well, imagine your AA-Tree, with <= as relation and where you keep inserting 1s and nothing else. How will it look ? -ap