[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9722] [octave forge] (image) new objects
From: |
Martin Janda |
Subject: |
[Octave-patch-tracker] [patch #9722] [octave forge] (image) new objects imref2d and imref3d |
Date: |
Wed, 14 Nov 2018 19:26:09 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 |
URL:
<https://savannah.gnu.org/patch/?9722>
Summary: [octave forge] (image) new objects imref2d and
imref3d
Project: GNU Octave
Submitted by: tojtoj
Submitted on: Thu 15 Nov 2018 12:26:08 AM UTC
Category: Forge : new function
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Hi, I added new objects imref2d and imref3d implemented as old-style classes.
These classes exhibit i-sa relationship in MATLAB and I respected that. Some
code could be inherited by imref3d and I didn't do it for the following
reason: a call to 'class(r, "imref3d", imref2d_object)' creates an object with
an imref2d field and then the imref3d would have only z-dimension fields. At
first, I shared the code and delegated some calls to imref2d parent, but then
I found out that 'filednames' function in MATLAB returns all fields for
imref2d as well as imref3d objects. So I copied all x- and y- related fields
from imref2d object to imref3d object in the constructor and duplicated all
the functionality of imref2d in imref3d. imref2d is used only to preserve the
is-a relashionship (the default imref2d instance sits in imref3d instance,
unused).
Quite a long story but I wanted to describe the reasoning behind my decision.
There might be a better solution, I'll be awaiting some feedback. So far as I
know, the code is MATLAB-compatible.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 15 Nov 2018 12:26:08 AM UTC Name: imref2d_imref3d.patch Size:
69KiB By: tojtoj
<http://savannah.gnu.org/patch/download.php?file_id=45427>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9722>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #9722] [octave forge] (image) new objects imref2d and imref3d,
Martin Janda <=