<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 23, 2016 at 8:55 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Recently the API for vtkAOSDataArrayTemplate was changed.<br>
<br>
Set/Get/Insert/InsertNextTupleValue was changed to<br>
Set/Get/Insert/InsertNextTypedTuple.<br>
<br>
What was the purpose of the name change?<br></blockquote></div></div></span></div></blockquote><div><br></div><div>I believe it was Berk who first proposed this when I was making the data array changes, so I'll let him correct me if I'm wrong. But as I understand it this was simply to clarify the difference between the typed and untyped getters/setters.</div><div><br></div><div>Personally, I'm ambivalent about the change. It's a definite improvement to the API, but any and all API changes are annoying for backwards compatibility, so it's a win/lose situation.</div><div><br></div><div>On Wed, Mar 23, 2016 at 11:51 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Actually, I recommend going even further: add new methods</div><div class="gmail_extra">called GetTypedValue() et al. and deprecate GetValue() et al.</div><div class="gmail_extra">Then, for VTK 8, I would love to see these method appear:</div><div class="gmail_extra"><br></div><div class="gmail_extra">  double vtkDataArray::GetValue()</div></div></blockquote><br><div>GetValue is not defined at the vtkDataArray level, and nor should it be (IMO).</div><div><br></div><div>My reasoning: vtkDataArray no longer assumes AOS ordering. The decision was that, ideally, vtkDataArray API would operate on tuples and components, while subclasses (e.g. AOS or SOA) would provide these more implementation-dependent lookups. In the context of SOA ordering, the value indices don't make a whole lot of sense and are inefficient to use, while GetComponentValue is efficient in either case.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">  vtkIdType vtkAbstractArray::GetNumberOfValues()</div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">I would really like GetNumberOfValues() to make a comeback.<br></div></div></blockquote><div><br></div><div>I agree -- so much so that I already added it! ;) It's not gone, it's just moved out of the implementation class to vtkAbstractArray.</div><div><br></div><div>On Thu, Mar 24, 2016 at 12:48 AM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><p dir="ltr">The new names don't make much sense to me.</p><div class=""><div class="h5"></div></div></blockquote></div><div>Can you elaborate? Compare:</div><div><br></div><div>GetTuple vs. GetTupleValue</div><div>to<br></div><div>GetTuple vs. GetTypedTuple</div><div><br></div><div>The meaning of the typed method seems much clearer now IMO. Do you feel the old method names more clearly communicate the reason for the method's existence to someone new to VTK?</div><div><br></div><div>Cheers,</div><div>Dave</div></div></div></div>