[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Similarity Clumping
- To: "sc-users@xxxxxxxxxxxxxxxx" <sc-users@xxxxxxxxxxxxxxxx>
- Subject: Re: [sc-users] Similarity Clumping
- From: "Armstrong, Newton" <Newton.Armstrong.1@xxxxxxxxxx>
- Date: Sat, 30 Nov 2019 09:28:51 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=city.ac.uk; dmarc=pass action=none header.from=city.ac.uk; dkim=pass header.d=city.ac.uk; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ereX0WX1JZiX6ox4beTEa923MCs+/FE6TqQqExJc65k=; b=Zh1zsmJXNn4PU3JkNVf+MoJiVlKGCxc3x8AnCvmUVynyBHBlXjlmRllGjGQOd089rUywhk9o7yyPW3qSwhozNu2qKKbnR7B1eHGBySZRqRPqAXrE9dsGQaqdJUOgWj+yl+Zv0RyHX9OD2EDegxTji/1DfaFCjJK83zsNSJ+HSrvjRybEqnIr0tQk/VGGYSfW+W+HlyXrZn2Bc8rL54LWUOz3Ftm7LNssXkT2cuexHi8R8nGHr+4UgrpshsWpLeScAkYnqmA9gPLSbehfwmLB7eaElr/v2yZPAnh47Bw0ar/AEFj1afkticqTK5Vx9ubwQN6Uko1gHRdzEBM97BkLHg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g5fEoxYZ1SAgOBb9lehLhDzDO0nlUlVOM+4fe9YQOgz5aXkcoGXJCuSXReS2KFXChe9dG/iXttBIWVe0oZzPl0C123ryj+PSBMqDDm05y8L6EFA8SiLY4vwhEeMK62EvktveGMGw+UGgiL/uFpFcMA/ZFTMk1kz+YA60cg01MTi7OKrSsR+wrS8uvWq+MwKfVUaRznI65zs5qCuiFUzmYL0zVAphvDixfUPivoBfYo1sQiRphnhYOApc0dnak5ZrG0cu/O/V6Z4ZwU9N4xqNKuJzWXlCIp/G6tNne0IUwCvpZjeLXEb8uv3QUKCV0hpxJ7UKhRoX5W7Oo0QPpH4b4w==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Newton.Armstrong.1@xxxxxxxxxx;
- In-reply-to: <CADbwe_HEwAPvDeD9DZp3M6ne+Bktvc4=EH+PViAudpF_AEGtww@mail.gmail.com>
- List-id: SuperCollider users mailing list <sc-users.create.ucsb.edu>
- References: <CADbwe_HEwAPvDeD9DZp3M6ne+Bktvc4=EH+PViAudpF_AEGtww@mail.gmail.com>
- Reply-to: sc-users@xxxxxxxxxxxxxxxx
- Sender: owner-sc-users@xxxxxxxxxxxxxxxx
- Thread-index: AQHVp2CSVD9f152TE0iYl8BTi9NsoA==
- Thread-topic: [sc-users] Similarity Clumping
a = [0.4, 0.42, 0.45, 0.46, 0.6, 0.7];
b = a.separate { |a, b| (b - a) >= 0.02 };
> On 30 Nov 2019, at 6:15am, jables.deutsch@xxxxxxxxx wrote:
>
> Hi all -
>
> I'd like to take an array and break it into sub-arrays, based on the difference between values.. It might be easier to illustrate:
>
> I have an array:
> a = [0.4, 0.42, 0.45, 0.46, 0.6, 0.7];
> And I want to set a threshold of difference - in this case: 0.02.
> newArray = [[0.4, 0.42], [0.45, 0.46], [0.6], [0.7]];
>
> Is there a function that does this kind of sorting intrinsically? Can anyone suggest an approach?
>
>
>
>
>
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/