| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GArrowTensor: Apache Arrow GLib Reference Manual</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> |
| <link rel="home" href="index.html" title="Apache Arrow GLib Reference Manual"> |
| <link rel="up" href="tensor.html" title="Tensor"> |
| <link rel="prev" href="tensor.html" title="Tensor"> |
| <link rel="next" href="type.html" title="Type"> |
| <meta name="generator" content="GTK-Doc V1.27 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| <td width="100%" align="left" class="shortcuts"> |
| <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| <a href="#GArrowTensor.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| <a href="#GArrowTensor.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> |
| <a href="#GArrowTensor.properties" class="shortcut">Properties</a></span> |
| </td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| <td><a accesskey="u" href="tensor.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| <td><a accesskey="p" href="tensor.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| <td><a accesskey="n" href="type.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| </tr></table> |
| <div class="refentry"> |
| <a name="GArrowTensor"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="GArrowTensor.top_of_page"></a>GArrowTensor</span></h2> |
| <p>GArrowTensor — Tensor class</p> |
| </td> |
| <td class="gallery_image" valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.functions"></a><h2>Functions</h2> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="functions_return"> |
| <col class="functions_name"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="returnvalue">GArrowTensor</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-new" title="garrow_tensor_new ()">garrow_tensor_new</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gboolean</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-equal" title="garrow_tensor_equal ()">garrow_tensor_equal</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="basic-data-type-classes.html#GArrowDataType"><span class="returnvalue">GArrowDataType</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-value-data-type" title="garrow_tensor_get_value_data_type ()">garrow_tensor_get_value_data_type</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="arrow-glib-GArrowType.html#GArrowType" title="enum GArrowType"><span class="returnvalue">GArrowType</span></a> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-value-type" title="garrow_tensor_get_value_type ()">garrow_tensor_get_value_type</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <a class="link" href="buffer-classes.html#GArrowBuffer"><span class="returnvalue">GArrowBuffer</span></a> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-buffer" title="garrow_tensor_get_buffer ()">garrow_tensor_get_buffer</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gint64</span> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-shape" title="garrow_tensor_get_shape ()">garrow_tensor_get_shape</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gint64</span> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-strides" title="garrow_tensor_get_strides ()">garrow_tensor_get_strides</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gint</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-n-dimensions" title="garrow_tensor_get_n_dimensions ()">garrow_tensor_get_n_dimensions</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type">const <span class="returnvalue">gchar</span> * |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-dimension-name" title="garrow_tensor_get_dimension_name ()">garrow_tensor_get_dimension_name</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gint64</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-get-size" title="garrow_tensor_get_size ()">garrow_tensor_get_size</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gboolean</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-is-mutable" title="garrow_tensor_is_mutable ()">garrow_tensor_is_mutable</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gboolean</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-is-contiguous" title="garrow_tensor_is_contiguous ()">garrow_tensor_is_contiguous</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gboolean</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-is-row-major" title="garrow_tensor_is_row_major ()">garrow_tensor_is_row_major</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| <tr> |
| <td class="function_type"> |
| <span class="returnvalue">gboolean</span> |
| </td> |
| <td class="function_name"> |
| <a class="link" href="GArrowTensor.html#garrow-tensor-is-column-major" title="garrow_tensor_is_column_major ()">garrow_tensor_is_column_major</a> <span class="c_punctuation">()</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.properties"></a><h2>Properties</h2> |
| <div class="informaltable"><table class="informaltable" border="0"> |
| <colgroup> |
| <col width="150px" class="properties_type"> |
| <col width="300px" class="properties_name"> |
| <col width="200px" class="properties_flags"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="property_type"> |
| <a class="link" href="buffer-classes.html#GArrowBuffer"><span class="type">GArrowBuffer</span></a> *</td> |
| <td class="property_name"><a class="link" href="GArrowTensor.html#GArrowTensor--buffer" title="The “buffer” property">buffer</a></td> |
| <td class="property_flags">Read / Write / Construct Only</td> |
| </tr> |
| <tr> |
| <td class="property_type"><span class="type">gpointer</span></td> |
| <td class="property_name"><a class="link" href="GArrowTensor.html#GArrowTensor--tensor" title="The “tensor” property">tensor</a></td> |
| <td class="property_flags">Write / Construct Only</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.other"></a><h2>Types and Values</h2> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="name"> |
| <col class="description"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="define_keyword">#define</td> |
| <td class="function_name"><a class="link" href="GArrowTensor.html#GARROW-TYPE-TENSOR:CAPS" title="GARROW_TYPE_TENSOR">GARROW_TYPE_TENSOR</a></td> |
| </tr> |
| <tr> |
| <td class="datatype_keyword">struct</td> |
| <td class="function_name"><a class="link" href="GArrowTensor.html#GArrowTensorClass" title="struct GArrowTensorClass">GArrowTensorClass</a></td> |
| </tr> |
| <tr> |
| <td class="datatype_keyword"> </td> |
| <td class="function_name"><a class="link" href="GArrowTensor.html#GArrowTensor-struct" title="GArrowTensor">GArrowTensor</a></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="screen"> GObject |
| <span class="lineart">╰──</span> GArrowTensor |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.includes"></a><h2>Includes</h2> |
| <pre class="synopsis">#include <arrow-glib/arrow-glib.h> |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.description"></a><h2>Description</h2> |
| <p><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> is a tensor class.</p> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.functions_details"></a><h2>Functions</h2> |
| <div class="refsect2"> |
| <a name="garrow-tensor-new"></a><h3>garrow_tensor_new ()</h3> |
| <pre class="programlisting"><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="returnvalue">GArrowTensor</span></a> * |
| garrow_tensor_new (<em class="parameter"><code><a class="link" href="basic-data-type-classes.html#GArrowDataType"><span class="type">GArrowDataType</span></a> *data_type</code></em>, |
| <em class="parameter"><code><a class="link" href="buffer-classes.html#GArrowBuffer"><span class="type">GArrowBuffer</span></a> *data</code></em>, |
| <em class="parameter"><code><span class="type">gint64</span> *shape</code></em>, |
| <em class="parameter"><code><span class="type">gsize</span> n_dimensions</code></em>, |
| <em class="parameter"><code><span class="type">gint64</span> *strides</code></em>, |
| <em class="parameter"><code><span class="type">gsize</span> n_strides</code></em>, |
| <em class="parameter"><code><span class="type">gchar</span> **dimension_names</code></em>, |
| <em class="parameter"><code><span class="type">gsize</span> n_dimension_names</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-new.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>data_type</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="basic-data-type-classes.html#GArrowDataType"><span class="type">GArrowDataType</span></a> that indicates each element type |
| in the tensor.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>data</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="buffer-classes.html#GArrowBuffer"><span class="type">GArrowBuffer</span></a> that contains tensor data.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>shape</p></td> |
| <td class="parameter_description"><p>A list of dimension sizes. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_dimensions]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>n_dimensions</p></td> |
| <td class="parameter_description"><p>The number of dimensions.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>strides</p></td> |
| <td class="parameter_description"><p>A list of the number of |
| bytes in each dimension. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_strides][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>n_strides</p></td> |
| <td class="parameter_description"><p>The number of strides.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>dimension_names</p></td> |
| <td class="parameter_description"><p>A list of |
| dimension names. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_dimension_names][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>n_dimension_names</p></td> |
| <td class="parameter_description"><p>The number of dimension names</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-new.returns"></a><h4>Returns</h4> |
| <p> The newly created <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-equal"></a><h3>garrow_tensor_equal ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| garrow_tensor_equal (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>, |
| <em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *other_tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-equal.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>other_tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> to be compared.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-equal.returns"></a><h4>Returns</h4> |
| <p> <code class="literal">TRUE</code> if both of them have the same data, <code class="literal">FALSE</code> |
| otherwise.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-4-0.html#api-index-0.4.0">0.4.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-value-data-type"></a><h3>garrow_tensor_get_value_data_type ()</h3> |
| <pre class="programlisting"><a class="link" href="basic-data-type-classes.html#GArrowDataType"><span class="returnvalue">GArrowDataType</span></a> * |
| garrow_tensor_get_value_data_type (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-value-data-type.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-value-data-type.returns"></a><h4>Returns</h4> |
| <p>The data type of each value in the tensor. </p> |
| <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-value-type"></a><h3>garrow_tensor_get_value_type ()</h3> |
| <pre class="programlisting"><a class="link" href="arrow-glib-GArrowType.html#GArrowType" title="enum GArrowType"><span class="returnvalue">GArrowType</span></a> |
| garrow_tensor_get_value_type (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-value-type.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-value-type.returns"></a><h4>Returns</h4> |
| <p> The type of each value in the tensor.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-buffer"></a><h3>garrow_tensor_get_buffer ()</h3> |
| <pre class="programlisting"><a class="link" href="buffer-classes.html#GArrowBuffer"><span class="returnvalue">GArrowBuffer</span></a> * |
| garrow_tensor_get_buffer (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-buffer.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-buffer.returns"></a><h4>Returns</h4> |
| <p>The data of the tensor. </p> |
| <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-shape"></a><h3>garrow_tensor_get_shape ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gint64</span> * |
| garrow_tensor_get_shape (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>, |
| <em class="parameter"><code><span class="type">gint</span> *n_dimensions</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-shape.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>n_dimensions</p></td> |
| <td class="parameter_description"><p>The number of dimensions. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-shape.returns"></a><h4>Returns</h4> |
| <p>The shape of the tensor.</p> |
| <p> It should be freed with <code class="function">g_free()</code> when no longer needed. </p> |
| <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_dimensions][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-strides"></a><h3>garrow_tensor_get_strides ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gint64</span> * |
| garrow_tensor_get_strides (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>, |
| <em class="parameter"><code><span class="type">gint</span> *n_strides</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-strides.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>n_strides</p></td> |
| <td class="parameter_description"><p>The number of strides. </p></td> |
| <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-strides.returns"></a><h4>Returns</h4> |
| <p>The strides of the tensor.</p> |
| <p> It should be freed with <code class="function">g_free()</code> when no longer needed. </p> |
| <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_strides][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-n-dimensions"></a><h3>garrow_tensor_get_n_dimensions ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gint</span> |
| garrow_tensor_get_n_dimensions (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-n-dimensions.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-n-dimensions.returns"></a><h4>Returns</h4> |
| <p> The number of dimensions of the tensor.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-dimension-name"></a><h3>garrow_tensor_get_dimension_name ()</h3> |
| <pre class="programlisting">const <span class="returnvalue">gchar</span> * |
| garrow_tensor_get_dimension_name (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>, |
| <em class="parameter"><code><span class="type">gint</span> i</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-dimension-name.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody> |
| <tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| <tr> |
| <td class="parameter_name"><p>i</p></td> |
| <td class="parameter_description"><p>The index of the target dimension.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-dimension-name.returns"></a><h4>Returns</h4> |
| <p> The i-th dimension name of the tensor.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-get-size"></a><h3>garrow_tensor_get_size ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gint64</span> |
| garrow_tensor_get_size (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-size.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-get-size.returns"></a><h4>Returns</h4> |
| <p> The number of value cells in the tensor.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-is-mutable"></a><h3>garrow_tensor_is_mutable ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| garrow_tensor_is_mutable (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-mutable.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-mutable.returns"></a><h4>Returns</h4> |
| <p> <code class="literal">TRUE</code> if the tensor is mutable, <code class="literal">FALSE</code> otherwise.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-is-contiguous"></a><h3>garrow_tensor_is_contiguous ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| garrow_tensor_is_contiguous (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-contiguous.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-contiguous.returns"></a><h4>Returns</h4> |
| <p> <code class="literal">TRUE</code> if the tensor is contiguous, <code class="literal">FALSE</code> otherwise.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-is-row-major"></a><h3>garrow_tensor_is_row_major ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| garrow_tensor_is_row_major (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-row-major.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-row-major.returns"></a><h4>Returns</h4> |
| <p> <code class="literal">TRUE</code> if the tensor is row major a.k.a. C order, |
| <code class="literal">FALSE</code> otherwise.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="garrow-tensor-is-column-major"></a><h3>garrow_tensor_is_column_major ()</h3> |
| <pre class="programlisting"><span class="returnvalue">gboolean</span> |
| garrow_tensor_is_column_major (<em class="parameter"><code><a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a> *tensor</code></em>);</pre> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-column-major.parameters"></a><h4>Parameters</h4> |
| <div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| <colgroup> |
| <col width="150px" class="parameters_name"> |
| <col class="parameters_description"> |
| <col width="200px" class="parameters_annotations"> |
| </colgroup> |
| <tbody><tr> |
| <td class="parameter_name"><p>tensor</p></td> |
| <td class="parameter_description"><p>A <a class="link" href="GArrowTensor.html" title="GArrowTensor"><span class="type">GArrowTensor</span></a>.</p></td> |
| <td class="parameter_annotations"> </td> |
| </tr></tbody> |
| </table></div> |
| </div> |
| <div class="refsect3"> |
| <a name="garrow-tensor-is-column-major.returns"></a><h4>Returns</h4> |
| <p> <code class="literal">TRUE</code> if the tensor is column major a.k.a. Fortran order, |
| <code class="literal">FALSE</code> otherwise.</p> |
| </div> |
| <p class="since">Since: <a class="link" href="api-index-0-3-0.html#api-index-0.3.0">0.3.0</a></p> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.other_details"></a><h2>Types and Values</h2> |
| <div class="refsect2"> |
| <a name="GARROW-TYPE-TENSOR:CAPS"></a><h3>GARROW_TYPE_TENSOR</h3> |
| <pre class="programlisting">#define GARROW_TYPE_TENSOR (garrow_tensor_get_type()) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GArrowTensorClass"></a><h3>struct GArrowTensorClass</h3> |
| <pre class="programlisting">struct GArrowTensorClass { |
| GObjectClass parent_class; |
| }; |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GArrowTensor-struct"></a><h3>GArrowTensor</h3> |
| <pre class="programlisting">typedef struct _GArrowTensor GArrowTensor;</pre> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="GArrowTensor.property-details"></a><h2>Property Details</h2> |
| <div class="refsect2"> |
| <a name="GArrowTensor--buffer"></a><h3>The <code class="literal">“buffer”</code> property</h3> |
| <pre class="programlisting"> “buffer” <a class="link" href="buffer-classes.html#GArrowBuffer"><span class="type">GArrowBuffer</span></a> *</pre> |
| <p>The data.</p> |
| <p>Flags: Read / Write / Construct Only</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GArrowTensor--tensor"></a><h3>The <code class="literal">“tensor”</code> property</h3> |
| <pre class="programlisting"> “tensor” <span class="type">gpointer</span></pre> |
| <p>The raw std::shared<arrow::Tensor> *.</p> |
| <p>Flags: Write / Construct Only</p> |
| </div> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr>Generated by GTK-Doc V1.27</div> |
| <script type="text/javascript" src="/docs/_static/versionwarning.js"></script></body> |
| </html> |