plaintext_docs.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // BSD 2-Clause License
  2. // Copyright (c) 2023, OpenFHE
  3. // All rights reserved.
  4. // Redistribution and use in source and binary forms, with or without
  5. // modification, are permitted provided that the following conditions are met:
  6. // 1. Redistributions of source code must retain the above copyright notice, this
  7. // list of conditions and the following disclaimer.
  8. // 2. Redistributions in binary form must reproduce the above copyright notice,
  9. // this list of conditions and the following disclaimer in the documentation
  10. // and/or other materials provided with the distribution.
  11. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  12. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  13. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  14. // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  15. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  16. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  17. // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  18. // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  20. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  21. #ifndef PLAINTEXT_DOCSTRINGS_H
  22. #define PLAINTEXT_DOCSTRINGS_H
  23. // GetScalingFactor
  24. const char* ptx_GetScalingFactor_docs = R"doc(
  25. Get the scaling factor of the plaintext for CKKS-based plaintexts.
  26. :return: The scaling factor of the plaintext.
  27. :rtype: float
  28. )doc";
  29. // SetScalingFactor
  30. const char* ptx_SetScalingFactor_docs = R"pbdoc(
  31. Set the scaling factor of the plaintext for CKKS-based plaintexts.
  32. :param sf: The scaling factor to set.
  33. :type sf: float
  34. )pbdoc";
  35. // GetLength
  36. const char* ptx_GetLength_docs = R"pbdoc(
  37. Get method to return the length of the plaintext.
  38. :return: The length of the plaintext in terms of the number of bits.
  39. :rtype: int
  40. )pbdoc";
  41. // GetSchemeID
  42. const char* ptx_GetSchemeID_docs = R"pbdoc(
  43. Get the encryption technique of the plaintext for BFV-based plaintexts.
  44. :return: The scheme ID of the plaintext.
  45. :rtype: SCHEME
  46. )pbdoc";
  47. // SetLength
  48. const char* ptx_SetLength_docs = R"pbdoc(
  49. Resize the plaintext; only works for plaintexts that support a resizable vector (coefpacked).
  50. :param newSize: The new size of the plaintext.
  51. :type newSize: int
  52. )pbdoc";
  53. // IsEncoded
  54. const char* ptx_IsEncoded_docs = R"pbdoc(
  55. Check if the plaintext is encoded.
  56. :return: True if the plaintext is encoded, False otherwise.
  57. :rtype: bool
  58. )pbdoc";
  59. // GetLogPrecision
  60. const char* ptx_GetLogPrecision_docs = R"pbdoc(
  61. Get the log of the plaintext precision.
  62. :return: The log of the plaintext precision.
  63. :rtype: float
  64. )pbdoc";
  65. // Encode
  66. const char* ptx_Encode_docs = R"pbdoc(
  67. Encode the plaintext into a polynomial.
  68. )pbdoc";
  69. // Decode
  70. const char* ptx_Decode_docs = R"pbdoc(
  71. Decode the polynomial into a plaintext.
  72. )pbdoc";
  73. // GetCKKSPackedValue
  74. const char* ptx_GetCKKSPackedValue_docs = R"pbdoc(
  75. Get the packed value of the plaintext for CKKS-based plaintexts.
  76. :return: The packed value of the plaintext.
  77. :rtype: List[complex]
  78. )pbdoc";
  79. #endif // PLAINTEXT_DOCSTRINGS_H