[Cbor] typed arrays for complex numbers

Gregory Allen <gallen@arlut.utexas.edu> Thu, 11 July 2019 23:24 UTC

Return-Path: <gallen@arlut.utexas.edu>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BC91C1200B8 for <cbor@ietfa.amsl.com>; Thu, 11 Jul 2019 16:24:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=arlut.utexas.edu
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aWl3xlRbs-IW for <cbor@ietfa.amsl.com>; Thu, 11 Jul 2019 16:24:32 -0700 (PDT)
Received: from esa1.arlut.utexas.edu (esa1.arlut.utexas.edu [146.6.211.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BEDA5120041 for <cbor@ietf.org>; Thu, 11 Jul 2019 16:24:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arlut.utexas.edu; i=@arlut.utexas.edu; q=dns/txt; s=default; t=1562887471; x=1594423471; h=from:mime-version:subject:message-id:date:to; bh=v2ETH2FBp+hegyv6mHYQFzjwMoCdTKrP1xDbnjTNZhs=; b=mJ89qHoiiO+uGEq0+w8OiluXVQ0kbSIebXgOb0CVRGZataN+8n4pnDpF VRZKYNDsKefrKgw6Bn8N1byRnZ9jyIn0jOZy+dwdE9ogUUS6kZogpMukc CR/4uXzymh9VHbgo+f3IayVriwd9ReRrENRFdx2qkpUTArr2tlqawQpGy OoOKu/vl85gmWhfE7Z4D2jS63AH1rdC49C0PXqEOrs/bKSYZUiDzItQhk ihqWkeuHBzRJzCHF4rPvkQ5MaJhANBmcgDHvn3s9KFZzuFtQUZ6sTVNXT A7BZT7yatolYnQFfb1026e8bCsScQxTXMGUnsK/uGJjDuklZrW3nlkRyz g==;
IronPort-SDR: /As3wrDYK5I/FMwRIP1v2wl2QhhgKiV+u9sWieg3eNsuhMV51gmUKr7dii+6xdwULL6JNsgABz yE185y0lcEp8gP9K3Lbmb6oKOw2Daj27FGxhJfIh6PsljDO8KUb1ukTEgvNPBiRwyJ1MaelMeX i5akfBj2tBccU97byyTaENsGcMyyJAAW/wwrmY9Cuv9KX9tKvA2jDdiprQAGuR4NHvsGwZ3r7M iWGlc15noMG0PkIqyqF85eNxx9f5QaCe7aPlg3cTn9IcgLYhyBJZX6I97OPhlQPFJKm4i/97Ys EA0=
X-IronPort-AV: E=McAfee;i="6000,8403,9315"; a="7286823"
X-IronPort-AV: E=Sophos; i="5.63,480,1557205200"; d="p7s'?scan'208"; a="7286823"
Received: from intpfx1.arlut.utexas.edu ([10.14.8.87]) by esa1.arlut.utexas.edu with ESMTP; 11 Jul 2019 18:24:30 -0500
Received: from intesa1.arlut.utexas.edu (intesa1.arlut.utexas.edu [10.14.8.10]) by intpfx1.arlut.utexas.edu (Postfix) with ESMTP id 4C962BC0DE for <cbor@ietf.org>; Thu, 11 Jul 2019 18:24:30 -0500 (CDT)
X-IronPort-AV: E=McAfee;i="6000,8403,9315"; a="2580538"
X-IronPort-AV: E=Sophos; i="5.63,480,1557205200"; d="p7s'?scan'208"; a="2580538"
Received: from syrinx.arlut.utexas.edu ([10.14.104.95]) by mail.arlut.utexas.edu with ESMTP; 11 Jul 2019 18:24:30 -0500
From: Gregory Allen <gallen@arlut.utexas.edu>
Content-Type: multipart/signed; boundary="Apple-Mail=_0DBEB03F-C0BF-4F02-95ED-51D828417255"; protocol="application/pkcs7-signature"; micalg=sha1
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Message-Id: <15400EA6-DA5F-499E-B9A5-B98E0A6887CB@arlut.utexas.edu>
Date: Thu, 11 Jul 2019 18:24:29 -0500
To: cbor@ietf.org
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/8YlbXLNCR5IxXnAOGJtUdX4lMZA>
Subject: [Cbor] typed arrays for complex numbers
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 11 Jul 2019 23:24:34 -0000

I’m glad to see the proposal for typed homogeneous arrays in CBOR, and have a question.

How would one markup complex data? Similarly, how would one markup other compound types such as quaternion, RGB, or RGBA data?

Note that there is some disagreement out there as to approaches for this. NumPy defines new types for complex numbers (e.g. complex64). HDF5 describes complex numbers as structs containing re and im.

I believe that complex numbers are an important and widely used class of data for CBOR to be able to contain.

I could imaging a “complex” tag, that’s a modifier for a dataType, so that one could do:

    multi-dim([dim, complex(ta-float32le(bstr)) ])

However, that doesn’t scale well to having several different compound types such as those mentioned above.

What are your thoughts on containing this kind of data?

Thanks,
-Greg

Gregory E. Allen, PhD, Sr Engineering Scientist
Applied Research Laboratories: The University of Texas at Austin
512-835-3487