\hypertarget{group__Eina__Matrixsparse__Group}{}\doxysection{Sparse Matrix}
\label{group__Eina__Matrixsparse__Group}\index{Sparse Matrix@{Sparse Matrix}}


These functions manage sparse matrices.  


\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}\label{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}} 
typedef struct \+\_\+\+Eina\+\_\+\+Matrixsparse {\bfseries Eina\+\_\+\+Matrixsparse}
\begin{DoxyCompactList}\small\item\em Type for a generic sparse matrix. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gae4c210f6fbdb9bab850ecbecc5e68cdb}\label{group__Eina__Matrixsparse__Group_gae4c210f6fbdb9bab850ecbecc5e68cdb}} 
typedef struct \+\_\+\+Eina\+\_\+\+Matrixsparse\+\_\+\+Row {\bfseries Eina\+\_\+\+Matrixsparse\+\_\+\+Row}
\begin{DoxyCompactList}\small\item\em Type for a generic sparse matrix row, opaque for users. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}\label{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}} 
typedef struct \+\_\+\+Eina\+\_\+\+Matrixsparse\+\_\+\+Cell {\bfseries Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}
\begin{DoxyCompactList}\small\item\em Type for a generic sparse matrix cell, opaque for users. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae3ba19b1b476d6c7cc219298e00fb311}{eina\+\_\+matrixsparse\+\_\+new}} (unsigned long rows, unsigned long cols, void($\ast$free\+\_\+func)(void $\ast$user\+\_\+data, void $\ast$cell\+\_\+data), const void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Creates a new Sparse Matrix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga03d8aba03eba33f995162167abb51b7f}{eina\+\_\+matrixsparse\+\_\+free}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m)
\begin{DoxyCompactList}\small\item\em Frees resources allocated for a Sparse Matrix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga95ebc29cbe7acf1332950c4085140be1}{eina\+\_\+matrixsparse\+\_\+size\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long $\ast$rows, unsigned long $\ast$cols)
\begin{DoxyCompactList}\small\item\em Gets the current size of a Sparse Matrix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gafef36593069eecbce74aff711657efac}{eina\+\_\+matrixsparse\+\_\+size\+\_\+set}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long rows, unsigned long cols)
\begin{DoxyCompactList}\small\item\em Resizes the Sparse Matrix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga28855f3f2b42e5d3de3fff1e08074e3a}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long row, unsigned long col, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$$\ast$cell)
\begin{DoxyCompactList}\small\item\em Gets the cell reference inside the Sparse Matrix. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$cell)
\begin{DoxyCompactList}\small\item\em Gets data associated with given cell reference. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf1f2608878b411f7244fc4ec16020a2c}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long row, unsigned long col)
\begin{DoxyCompactList}\small\item\em Gets data associated with given cell given its indexes. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga9030b42d0fa9484127e213cc82350d32}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+position\+\_\+get}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$cell, unsigned long $\ast$row, unsigned long $\ast$col)
\begin{DoxyCompactList}\small\item\em Gets the row and column position of the given cell. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$cell, const void $\ast$data, void $\ast$$\ast$p\+\_\+old)
\begin{DoxyCompactList}\small\item\em Changes cell reference value without freeing the possibly existing old value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gac2b5f9c358f28c09e723f30ac696e124}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+set}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$cell, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Changes cell value, freeing any previously existing value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga0d8cbac94b1ee980c9098028b63197ad}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+replace}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long row, unsigned long col, const void $\ast$data, void $\ast$$\ast$p\+\_\+old)
\begin{DoxyCompactList}\small\item\em Changes cell value at a given row and column position, without freeing previously existing values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gacdc63888f534b5147b6bb91396416e25}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+set}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long row, unsigned long col, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Changes cell value at a given row and column position, freeing any previously existing value. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gafc25b910d88ef31a0ae3be8ea22f9c33}{eina\+\_\+matrixsparse\+\_\+row\+\_\+idx\+\_\+clear}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long row)
\begin{DoxyCompactList}\small\item\em Clears (erases all cells) of a given row number. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga74a42a63c91ed77d95f2fd88e830ae30}{eina\+\_\+matrixsparse\+\_\+column\+\_\+idx\+\_\+clear}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long col)
\begin{DoxyCompactList}\small\item\em Clears (erases all cells) of column given its index. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae429c37ec5f6110c634b253faad90d1c}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+clear}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m, unsigned long row, unsigned long col)
\begin{DoxyCompactList}\small\item\em Clears (erases) cell at a given row, column position. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga890023c6d5da32fff4616156f921682c}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+clear}} (\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$cell)
\begin{DoxyCompactList}\small\item\em Clears (erases) cell given its reference. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae01128fdba1763a7f1047c2466951406}{eina\+\_\+matrixsparse\+\_\+iterator\+\_\+new}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m)
\begin{DoxyCompactList}\small\item\em Creates a new iterator over only the existing matrix cells. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaeb4598487a78aad72ab39c50af4acba1}{eina\+\_\+matrixsparse\+\_\+iterator\+\_\+complete\+\_\+new}} (const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$m)
\begin{DoxyCompactList}\small\item\em Creates a new iterator over all matrix cells. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
These functions manage sparse matrices. 

A sparse matrix stores data objects in cells within a row / column tabular structure, where the majority of cells will be empty. The sparse matrix takes advantage of this emptiness by allocating memory only for non-\/empty cells and, in this implementation, storing them internally in linked lists.

For more information, you can look at the \mbox{\hyperlink{tutorial_matrixsparse_page}{Sparse Matrix Tutorial}}. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gae3ba19b1b476d6c7cc219298e00fb311}\label{group__Eina__Matrixsparse__Group_gae3ba19b1b476d6c7cc219298e00fb311}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_new@{eina\_matrixsparse\_new}}
\index{eina\_matrixsparse\_new@{eina\_matrixsparse\_new}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_new()}{eina\_matrixsparse\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$ eina\+\_\+matrixsparse\+\_\+new (\begin{DoxyParamCaption}\item[{unsigned long}]{rows,  }\item[{unsigned long}]{cols,  }\item[{void($\ast$)(void $\ast$user\+\_\+data, void $\ast$cell\+\_\+data)}]{free\+\_\+func,  }\item[{const void $\ast$}]{user\+\_\+data }\end{DoxyParamCaption})}



Creates a new Sparse Matrix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rows} & Number of rows in matrix. Operations with rows greater than this value will fail. \\
\hline
\mbox{\texttt{ in}}  & {\em cols} & Number of columns in matrix. Operations with columns greater than this value will fail. \\
\hline
\mbox{\texttt{ in}}  & {\em free\+\_\+func} & Used to delete cell data contents, used by \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga03d8aba03eba33f995162167abb51b7f}{eina\+\_\+matrixsparse\+\_\+free()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gafef36593069eecbce74aff711657efac}{eina\+\_\+matrixsparse\+\_\+size\+\_\+set()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gafc25b910d88ef31a0ae3be8ea22f9c33}{eina\+\_\+matrixsparse\+\_\+row\+\_\+idx\+\_\+clear()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga74a42a63c91ed77d95f2fd88e830ae30}{eina\+\_\+matrixsparse\+\_\+column\+\_\+idx\+\_\+clear()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae429c37ec5f6110c634b253faad90d1c}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+clear()}} and possible others. \\
\hline
\mbox{\texttt{ in}}  & {\em user\+\_\+data} & Given to {\itshape free\+\_\+func} as first parameter.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Newly allocated matrix, or {\ttfamily NULL} if allocation failed. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga03d8aba03eba33f995162167abb51b7f}\label{group__Eina__Matrixsparse__Group_ga03d8aba03eba33f995162167abb51b7f}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_free@{eina\_matrixsparse\_free}}
\index{eina\_matrixsparse\_free@{eina\_matrixsparse\_free}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_free()}{eina\_matrixsparse\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+matrixsparse\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m }\end{DoxyParamCaption})}



Frees resources allocated for a Sparse Matrix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The Sparse Matrix instance to free; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}


References \mbox{\hyperlink{group__Eina__Magic__Group_ga087a0d5a1e482da550b33fe4fcb0435f}{EINA\+\_\+\+MAGIC\+\_\+\+NONE}}, and \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga95ebc29cbe7acf1332950c4085140be1}\label{group__Eina__Matrixsparse__Group_ga95ebc29cbe7acf1332950c4085140be1}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_size\_get@{eina\_matrixsparse\_size\_get}}
\index{eina\_matrixsparse\_size\_get@{eina\_matrixsparse\_size\_get}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_size\_get()}{eina\_matrixsparse\_size\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+matrixsparse\+\_\+size\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long $\ast$}]{rows,  }\item[{unsigned long $\ast$}]{cols }\end{DoxyParamCaption})}



Gets the current size of a Sparse Matrix. 

The given parameters are guaranteed to be set if they\textquotesingle{}re not {\ttfamily NULL}, even if this function fails (i.\+e.\+: {\itshape m} is not a valid matrix instance).


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The sparse matrix to operate on. \\
\hline
\mbox{\texttt{ out}}  & {\em rows} & Returns the number of rows; may be {\ttfamily NULL}. If {\itshape m} is invalid, returned value is zero, otherwise it\textquotesingle{}s a positive integer. \\
\hline
\mbox{\texttt{ out}}  & {\em cols} & Returns the number of columns; may be {\ttfamily NULL}. If {\itshape m} is invalid, returned value is zero, otherwise it\textquotesingle{}s a positive integer. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gafef36593069eecbce74aff711657efac}\label{group__Eina__Matrixsparse__Group_gafef36593069eecbce74aff711657efac}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_size\_set@{eina\_matrixsparse\_size\_set}}
\index{eina\_matrixsparse\_size\_set@{eina\_matrixsparse\_size\_set}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_size\_set()}{eina\_matrixsparse\_size\_set()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+size\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{rows,  }\item[{unsigned long}]{cols }\end{DoxyParamCaption})}



Resizes the Sparse Matrix. 

This will resize the sparse matrix, potentially freeing cells on rows and columns that will no longer exist.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em m} & The sparse matrix to operate on. \\
\hline
\mbox{\texttt{ in}}  & {\em rows} & The new number of rows; must be greater than zero. \\
\hline
\mbox{\texttt{ in}}  & {\em cols} & The new number of columns; must be greater than zero. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} on failure.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Cells, rows or columns are not reference counted and thus references to freed instances may become invalid. 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga28855f3f2b42e5d3de3fff1e08074e3a}\label{group__Eina__Matrixsparse__Group_ga28855f3f2b42e5d3de3fff1e08074e3a}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_idx\_get@{eina\_matrixsparse\_cell\_idx\_get}}
\index{eina\_matrixsparse\_cell\_idx\_get@{eina\_matrixsparse\_cell\_idx\_get}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_idx\_get()}{eina\_matrixsparse\_cell\_idx\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{row,  }\item[{unsigned long}]{col,  }\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$$\ast$}]{cell }\end{DoxyParamCaption})}



Gets the cell reference inside the Sparse Matrix. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The sparse matrix. \\
\hline
\mbox{\texttt{ in}}  & {\em row} & The new number of row to clear. \\
\hline
\mbox{\texttt{ in}}  & {\em col} & The new number of column to clear. \\
\hline
\mbox{\texttt{ out}}  & {\em cell} & Pointer to return cell reference, if any exists.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\ttfamily 1} on success, {\ttfamily 0} on failure. It is considered successful if did not exist but index is inside matrix size, in this case {\ttfamily $\ast$cell} == NULL
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf1f2608878b411f7244fc4ec16020a2c}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+get()}} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}\label{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_data\_get@{eina\_matrixsparse\_cell\_data\_get}}
\index{eina\_matrixsparse\_cell\_data\_get@{eina\_matrixsparse\_cell\_data\_get}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_data\_get()}{eina\_matrixsparse\_cell\_data\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void $\ast$ eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$}]{cell }\end{DoxyParamCaption})}



Gets data associated with given cell reference. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cell} & Given cell reference, must {\bfseries{not}} be {\ttfamily NULL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Data associated with given cell.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga28855f3f2b42e5d3de3fff1e08074e3a}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+get()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf1f2608878b411f7244fc4ec16020a2c}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+get()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gaf1f2608878b411f7244fc4ec16020a2c}\label{group__Eina__Matrixsparse__Group_gaf1f2608878b411f7244fc4ec16020a2c}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_data\_idx\_get@{eina\_matrixsparse\_data\_idx\_get}}
\index{eina\_matrixsparse\_data\_idx\_get@{eina\_matrixsparse\_data\_idx\_get}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_data\_idx\_get()}{eina\_matrixsparse\_data\_idx\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void $\ast$ eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{row,  }\item[{unsigned long}]{col }\end{DoxyParamCaption})}



Gets data associated with given cell given its indexes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The sparse matrix to operate on. \\
\hline
\mbox{\texttt{ in}}  & {\em row} & The row number. \\
\hline
\mbox{\texttt{ in}}  & {\em col} & The column number.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Data associated with given cell or {\ttfamily NULL} if nothing is associated.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga28855f3f2b42e5d3de3fff1e08074e3a}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+get()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga9030b42d0fa9484127e213cc82350d32}\label{group__Eina__Matrixsparse__Group_ga9030b42d0fa9484127e213cc82350d32}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_position\_get@{eina\_matrixsparse\_cell\_position\_get}}
\index{eina\_matrixsparse\_cell\_position\_get@{eina\_matrixsparse\_cell\_position\_get}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_position\_get()}{eina\_matrixsparse\_cell\_position\_get()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+cell\+\_\+position\+\_\+get (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$}]{cell,  }\item[{unsigned long $\ast$}]{row,  }\item[{unsigned long $\ast$}]{col }\end{DoxyParamCaption})}



Gets the row and column position of the given cell. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cell} & The cell reference; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\mbox{\texttt{ out}}  & {\em row} & The returned row number; may be {\ttfamily NULL}. \\
\hline
\mbox{\texttt{ out}}  & {\em col} & The returned column number; may be {\ttfamily NULL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise ({\ttfamily cell} is {\ttfamily NULL}). 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}\label{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_data\_replace@{eina\_matrixsparse\_cell\_data\_replace}}
\index{eina\_matrixsparse\_cell\_data\_replace@{eina\_matrixsparse\_cell\_data\_replace}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_data\_replace()}{eina\_matrixsparse\_cell\_data\_replace()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$}]{cell,  }\item[{const void $\ast$}]{data,  }\item[{void $\ast$$\ast$}]{p\+\_\+old }\end{DoxyParamCaption})}



Changes cell reference value without freeing the possibly existing old value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em cell} & The cell reference; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & New data to set. \\
\hline
\mbox{\texttt{ out}}  & {\em p\+\_\+old} & Returns the old value intact (not freed).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise ({\itshape cell} is {\ttfamily NULL}).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gac2b5f9c358f28c09e723f30ac696e124}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+set()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga0d8cbac94b1ee980c9098028b63197ad}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+replace()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gac2b5f9c358f28c09e723f30ac696e124}\label{group__Eina__Matrixsparse__Group_gac2b5f9c358f28c09e723f30ac696e124}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_data\_set@{eina\_matrixsparse\_cell\_data\_set}}
\index{eina\_matrixsparse\_cell\_data\_set@{eina\_matrixsparse\_cell\_data\_set}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_data\_set()}{eina\_matrixsparse\_cell\_data\_set()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$}]{cell,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Changes cell value, freeing any previously existing value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em cell} & The cell reference; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & New data to set.\\
\hline
\end{DoxyParams}
In contrast to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}}, this function will call {\ttfamily free\+\_\+func()} on the existing value, if one exists.

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise ({\itshape cell} is {\ttfamily NULL}).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gacdc63888f534b5147b6bb91396416e25}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+set()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga0d8cbac94b1ee980c9098028b63197ad}\label{group__Eina__Matrixsparse__Group_ga0d8cbac94b1ee980c9098028b63197ad}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_data\_idx\_replace@{eina\_matrixsparse\_data\_idx\_replace}}
\index{eina\_matrixsparse\_data\_idx\_replace@{eina\_matrixsparse\_data\_idx\_replace}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_data\_idx\_replace()}{eina\_matrixsparse\_data\_idx\_replace()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+replace (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{row,  }\item[{unsigned long}]{col,  }\item[{const void $\ast$}]{data,  }\item[{void $\ast$$\ast$}]{p\+\_\+old }\end{DoxyParamCaption})}



Changes cell value at a given row and column position, without freeing previously existing values. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em m} & The sparse matrix; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\mbox{\texttt{ in}}  & {\em row} & The row number. \\
\hline
\mbox{\texttt{ in}}  & {\em col} & The column number. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & New data to set. \\
\hline
\mbox{\texttt{ out}}  & {\em p\+\_\+old} & The previous value, returned intact (not freed).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise ({\itshape m} is {\ttfamily NULL}, or row, column indexes are not valid).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gacdc63888f534b5147b6bb91396416e25}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+set()}} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gacdc63888f534b5147b6bb91396416e25}\label{group__Eina__Matrixsparse__Group_gacdc63888f534b5147b6bb91396416e25}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_data\_idx\_set@{eina\_matrixsparse\_data\_idx\_set}}
\index{eina\_matrixsparse\_data\_idx\_set@{eina\_matrixsparse\_data\_idx\_set}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_data\_idx\_set()}{eina\_matrixsparse\_data\_idx\_set()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{row,  }\item[{unsigned long}]{col,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Changes cell value at a given row and column position, freeing any previously existing value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em m} & The sparse matrix, must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\mbox{\texttt{ in}}  & {\em row} & The row number to set the value. \\
\hline
\mbox{\texttt{ in}}  & {\em col} & The column number to set the value. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & New data to set.\\
\hline
\end{DoxyParams}
In contrast to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga0d8cbac94b1ee980c9098028b63197ad}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+replace()}}, this function will call {\ttfamily free\+\_\+func()} on the existing value, if one exists.

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} otherwise ({\itshape m} is {\ttfamily NULL}, indexes are not valid).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gab637198c851a4e2931d1d7a03e916fc3}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}} 
\end{DoxySeeAlso}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gafc25b910d88ef31a0ae3be8ea22f9c33}\label{group__Eina__Matrixsparse__Group_gafc25b910d88ef31a0ae3be8ea22f9c33}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_row\_idx\_clear@{eina\_matrixsparse\_row\_idx\_clear}}
\index{eina\_matrixsparse\_row\_idx\_clear@{eina\_matrixsparse\_row\_idx\_clear}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_row\_idx\_clear()}{eina\_matrixsparse\_row\_idx\_clear()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+row\+\_\+idx\+\_\+clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{row }\end{DoxyParamCaption})}



Clears (erases all cells) of a given row number. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em m} & The sparse matrix to operate on. \\
\hline
\mbox{\texttt{ in}}  & {\em row} & The row number to clear.\\
\hline
\end{DoxyParams}
Existing cells will be cleared with {\ttfamily free\+\_\+func()} given to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae3ba19b1b476d6c7cc219298e00fb311}{eina\+\_\+matrixsparse\+\_\+new()}}.

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} on failure (such as requesting a row outside the matrix\textquotesingle{}s defined size). It is considered successful if the row had no cells filled.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Cells, rows or columns are not reference counted and thus references to freed instances may become invalid. 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga74a42a63c91ed77d95f2fd88e830ae30}\label{group__Eina__Matrixsparse__Group_ga74a42a63c91ed77d95f2fd88e830ae30}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_column\_idx\_clear@{eina\_matrixsparse\_column\_idx\_clear}}
\index{eina\_matrixsparse\_column\_idx\_clear@{eina\_matrixsparse\_column\_idx\_clear}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_column\_idx\_clear()}{eina\_matrixsparse\_column\_idx\_clear()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+column\+\_\+idx\+\_\+clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{col }\end{DoxyParamCaption})}



Clears (erases all cells) of column given its index. 

Existing cells will be cleared with {\ttfamily free\+\_\+func()} given to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae3ba19b1b476d6c7cc219298e00fb311}{eina\+\_\+matrixsparse\+\_\+new()}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em m} & The sparse matrix to operate on. \\
\hline
\mbox{\texttt{ in}}  & {\em col} & The column number to clear.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} on failure (such as requesting a column outside the matrix\textquotesingle{}s defined size). It is considered successful if the column had no cells filled.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Cells, rows or columns are not reference counted and thus references to freed instances may become invalid. 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gae429c37ec5f6110c634b253faad90d1c}\label{group__Eina__Matrixsparse__Group_gae429c37ec5f6110c634b253faad90d1c}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_idx\_clear@{eina\_matrixsparse\_cell\_idx\_clear}}
\index{eina\_matrixsparse\_cell\_idx\_clear@{eina\_matrixsparse\_cell\_idx\_clear}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_idx\_clear()}{eina\_matrixsparse\_cell\_idx\_clear()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m,  }\item[{unsigned long}]{row,  }\item[{unsigned long}]{col }\end{DoxyParamCaption})}



Clears (erases) cell at a given row, column position. 

Existing cell will be cleared with the {\ttfamily free\+\_\+func()} given to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae3ba19b1b476d6c7cc219298e00fb311}{eina\+\_\+matrixsparse\+\_\+new()}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em m} & The sparse matrix to operate on. \\
\hline
\mbox{\texttt{ in}}  & {\em row} & The row number. \\
\hline
\mbox{\texttt{ in}}  & {\em col} & The column number.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} on failure (such as requesting a row or column outside the matrix\textquotesingle{}s defined size). It is considered successful if no cell existed at the otherwise valid position.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Cells, rows or columns are not reference counted and thus references to freed instances may become invalid.
\end{DoxyWarning}
\begin{DoxyNote}{Note}
This call might also free the column and/or row if this was the last remaining cell contained. 
\end{DoxyNote}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gae7cf7b1d66fa9022242e09fd53c06bb2}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+FALSE\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga890023c6d5da32fff4616156f921682c}\label{group__Eina__Matrixsparse__Group_ga890023c6d5da32fff4616156f921682c}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_cell\_clear@{eina\_matrixsparse\_cell\_clear}}
\index{eina\_matrixsparse\_cell\_clear@{eina\_matrixsparse\_cell\_clear}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_cell\_clear()}{eina\_matrixsparse\_cell\_clear()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+matrixsparse\+\_\+cell\+\_\+clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}} $\ast$}]{cell }\end{DoxyParamCaption})}



Clears (erases) cell given its reference. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em cell} & The cell reference; must {\bfseries{not}} be {\ttfamily NULL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}} on failure.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Cells, rows or columns are not reference counted and thus references to freed instances may become invalid.
\end{DoxyWarning}
\begin{DoxyNote}{Note}
This call might also free the column and/or row if this was the last remaining cell contained. 
\end{DoxyNote}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gae01128fdba1763a7f1047c2466951406}\label{group__Eina__Matrixsparse__Group_gae01128fdba1763a7f1047c2466951406}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_iterator\_new@{eina\_matrixsparse\_iterator\_new}}
\index{eina\_matrixsparse\_iterator\_new@{eina\_matrixsparse\_iterator\_new}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_iterator\_new()}{eina\_matrixsparse\_iterator\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ eina\+\_\+matrixsparse\+\_\+iterator\+\_\+new (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m }\end{DoxyParamCaption})}



Creates a new iterator over only the existing matrix cells. 

This is a quick walk over the defined cells; the holes in the Sparse Matrix are skipped over, thus the returned entries will not have consecutive index numbers.

The iterator\textquotesingle{}s data element will be the current cell reference. This cell\textquotesingle{}s position and value can be retrieved with \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga9030b42d0fa9484127e213cc82350d32}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+position\+\_\+get()}} and \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The Sparse Matrix reference; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new iterator.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
If the matrix structure changes then the iterator becomes invalid! That is, if you add or remove cells this iterator behavior is undefined and your program may crash! 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, \mbox{\hyperlink{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}{FUNC\+\_\+\+ITERATOR\+\_\+\+FREE}}, \mbox{\hyperlink{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}{FUNC\+\_\+\+ITERATOR\+\_\+\+GET\+\_\+\+CONTAINER}}, and \mbox{\hyperlink{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}{FUNC\+\_\+\+ITERATOR\+\_\+\+NEXT}}.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gaeb4598487a78aad72ab39c50af4acba1}\label{group__Eina__Matrixsparse__Group_gaeb4598487a78aad72ab39c50af4acba1}} 
\index{Sparse Matrix@{Sparse Matrix}!eina\_matrixsparse\_iterator\_complete\_new@{eina\_matrixsparse\_iterator\_complete\_new}}
\index{eina\_matrixsparse\_iterator\_complete\_new@{eina\_matrixsparse\_iterator\_complete\_new}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{eina\_matrixsparse\_iterator\_complete\_new()}{eina\_matrixsparse\_iterator\_complete\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ eina\+\_\+matrixsparse\+\_\+iterator\+\_\+complete\+\_\+new (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$}]{m }\end{DoxyParamCaption})}



Creates a new iterator over all matrix cells. 

In contrast to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae01128fdba1763a7f1047c2466951406}{eina\+\_\+matrixsparse\+\_\+iterator\+\_\+new()}}, this routine iterates across all row and column positions in the matrix, returning dummy cells with no data where there are empty holes.

Be aware that since this iterates over all potential elements of a Sparse Matrix, not just the elements with actual data, this can result in a very large number of function calls.

The iterator\textquotesingle{}s data element will be the current cell reference. This cell\textquotesingle{}s position and value can be retrieved with \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga9030b42d0fa9484127e213cc82350d32}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+position\+\_\+get()}} and \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaf81a3967d3834898501636ef87e65dd2}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}}. If the cell is empty then the reference will be a dummy/placeholder, thus setting value with \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gac2b5f9c358f28c09e723f30ac696e124}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+set()}} will leave the pointer unreferenced.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The Sparse Matrix reference; must {\bfseries{not}} be {\ttfamily NULL}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new iterator.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
If the matrix structure changes then the iterator becomes invalid! That is, if you add or remove cells this iterator behavior is undefined and your program may crash! 
\end{DoxyWarning}


References \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, \mbox{\hyperlink{group__Eina__Iterator__Group_gad1ea4d3a7e58b47b23073a58e869d167}{FUNC\+\_\+\+ITERATOR\+\_\+\+FREE}}, \mbox{\hyperlink{group__Eina__Iterator__Group_gab41f5a30f0a2030f4a832548d18332db}{FUNC\+\_\+\+ITERATOR\+\_\+\+GET\+\_\+\+CONTAINER}}, and \mbox{\hyperlink{group__Eina__Iterator__Group_gaec80e80b2867e391b0b27f5f20c3a5b3}{FUNC\+\_\+\+ITERATOR\+\_\+\+NEXT}}.

