How can the property list of interpolating function be explored and exploited?












3












$begingroup$


While looking at this question, I asked myself the question given in the title. I post the results of my investigation in the question as an answer.



I used the example code given in the referenced question to carry out my investigation.










share|improve this question









$endgroup$

















    3












    $begingroup$


    While looking at this question, I asked myself the question given in the title. I post the results of my investigation in the question as an answer.



    I used the example code given in the referenced question to carry out my investigation.










    share|improve this question









    $endgroup$















      3












      3








      3





      $begingroup$


      While looking at this question, I asked myself the question given in the title. I post the results of my investigation in the question as an answer.



      I used the example code given in the referenced question to carry out my investigation.










      share|improve this question









      $endgroup$




      While looking at this question, I asked myself the question given in the title. I post the results of my investigation in the question as an answer.



      I used the example code given in the referenced question to carry out my investigation.







      properties






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      m_goldbergm_goldberg

      85.9k872196




      85.9k872196






















          1 Answer
          1






          active

          oldest

          votes


















          3












          $begingroup$

          pts = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
          f = Interpolation[pts]


          interp_func



          I extracted the property values from the property list with PropertyValue and made an association with the properties names as keys for ease of examination and access.



          propAssoc = Association[{# -> PropertyValue[f, #]} & /@ PropertyList[f]]


          warning



          assoc



          The association can be queried to get individual property values.



          propAssoc @ "Domain"



          {{0, 5}}




          but, of course, if we don't want the bother of making an association just to get one or a few property values, we can use



          PropertyValue[f, "Domain"]



          {{0, 5}}




          which seems always to be safe.



          However, be aware that f itself acts like an association when given a valid property name and, also being safe, should probably be considered the standard practice for accessing properties.



          f @ "Domain"



          {{0, 5}}







          share|improve this answer









          $endgroup$













          • $begingroup$
            Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
            $endgroup$
            – march
            5 hours ago










          • $begingroup$
            @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
            $endgroup$
            – m_goldberg
            4 hours ago










          • $begingroup$
            I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
            $endgroup$
            – march
            4 hours ago











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "387"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191161%2fhow-can-the-property-list-of-interpolating-function-be-explored-and-exploited%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3












          $begingroup$

          pts = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
          f = Interpolation[pts]


          interp_func



          I extracted the property values from the property list with PropertyValue and made an association with the properties names as keys for ease of examination and access.



          propAssoc = Association[{# -> PropertyValue[f, #]} & /@ PropertyList[f]]


          warning



          assoc



          The association can be queried to get individual property values.



          propAssoc @ "Domain"



          {{0, 5}}




          but, of course, if we don't want the bother of making an association just to get one or a few property values, we can use



          PropertyValue[f, "Domain"]



          {{0, 5}}




          which seems always to be safe.



          However, be aware that f itself acts like an association when given a valid property name and, also being safe, should probably be considered the standard practice for accessing properties.



          f @ "Domain"



          {{0, 5}}







          share|improve this answer









          $endgroup$













          • $begingroup$
            Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
            $endgroup$
            – march
            5 hours ago










          • $begingroup$
            @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
            $endgroup$
            – m_goldberg
            4 hours ago










          • $begingroup$
            I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
            $endgroup$
            – march
            4 hours ago
















          3












          $begingroup$

          pts = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
          f = Interpolation[pts]


          interp_func



          I extracted the property values from the property list with PropertyValue and made an association with the properties names as keys for ease of examination and access.



          propAssoc = Association[{# -> PropertyValue[f, #]} & /@ PropertyList[f]]


          warning



          assoc



          The association can be queried to get individual property values.



          propAssoc @ "Domain"



          {{0, 5}}




          but, of course, if we don't want the bother of making an association just to get one or a few property values, we can use



          PropertyValue[f, "Domain"]



          {{0, 5}}




          which seems always to be safe.



          However, be aware that f itself acts like an association when given a valid property name and, also being safe, should probably be considered the standard practice for accessing properties.



          f @ "Domain"



          {{0, 5}}







          share|improve this answer









          $endgroup$













          • $begingroup$
            Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
            $endgroup$
            – march
            5 hours ago










          • $begingroup$
            @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
            $endgroup$
            – m_goldberg
            4 hours ago










          • $begingroup$
            I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
            $endgroup$
            – march
            4 hours ago














          3












          3








          3





          $begingroup$

          pts = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
          f = Interpolation[pts]


          interp_func



          I extracted the property values from the property list with PropertyValue and made an association with the properties names as keys for ease of examination and access.



          propAssoc = Association[{# -> PropertyValue[f, #]} & /@ PropertyList[f]]


          warning



          assoc



          The association can be queried to get individual property values.



          propAssoc @ "Domain"



          {{0, 5}}




          but, of course, if we don't want the bother of making an association just to get one or a few property values, we can use



          PropertyValue[f, "Domain"]



          {{0, 5}}




          which seems always to be safe.



          However, be aware that f itself acts like an association when given a valid property name and, also being safe, should probably be considered the standard practice for accessing properties.



          f @ "Domain"



          {{0, 5}}







          share|improve this answer









          $endgroup$



          pts = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}};
          f = Interpolation[pts]


          interp_func



          I extracted the property values from the property list with PropertyValue and made an association with the properties names as keys for ease of examination and access.



          propAssoc = Association[{# -> PropertyValue[f, #]} & /@ PropertyList[f]]


          warning



          assoc



          The association can be queried to get individual property values.



          propAssoc @ "Domain"



          {{0, 5}}




          but, of course, if we don't want the bother of making an association just to get one or a few property values, we can use



          PropertyValue[f, "Domain"]



          {{0, 5}}




          which seems always to be safe.



          However, be aware that f itself acts like an association when given a valid property name and, also being safe, should probably be considered the standard practice for accessing properties.



          f @ "Domain"



          {{0, 5}}








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 5 hours ago









          m_goldbergm_goldberg

          85.9k872196




          85.9k872196












          • $begingroup$
            Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
            $endgroup$
            – march
            5 hours ago










          • $begingroup$
            @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
            $endgroup$
            – m_goldberg
            4 hours ago










          • $begingroup$
            I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
            $endgroup$
            – march
            4 hours ago


















          • $begingroup$
            Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
            $endgroup$
            – march
            5 hours ago










          • $begingroup$
            @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
            $endgroup$
            – m_goldberg
            4 hours ago










          • $begingroup$
            I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
            $endgroup$
            – march
            4 hours ago
















          $begingroup$
          Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
          $endgroup$
          – march
          5 hours ago




          $begingroup$
          Is this meant to be sort of a canonical question/answer that we can point to whenever someone is wondering how to extract information from an InterpolatingFunction? And, if so, isn't the canonical answer just your very last paragraph?
          $endgroup$
          – march
          5 hours ago












          $begingroup$
          @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
          $endgroup$
          – m_goldberg
          4 hours ago




          $begingroup$
          @march I didn't intend for it a canonical question but as an example of how to go about finding and using the properties of functions that have them. If it is useful as a canonical that'a a bonus. However, I think the 1st part, about how extract info on the properties, is as useful as the final conclusion.
          $endgroup$
          – m_goldberg
          4 hours ago












          $begingroup$
          I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
          $endgroup$
          – march
          4 hours ago




          $begingroup$
          I mean, I definitely like the Association construction, since it has both the possible property names and their values all in one object, easily accessible and readable (rather than having to remember what properties there are). So, I get it!
          $endgroup$
          – march
          4 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematica Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191161%2fhow-can-the-property-list-of-interpolating-function-be-explored-and-exploited%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to label and detect the document text images

          Vallis Paradisi

          Tabula Rosettana