\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 
typedef struct \+\_\+\+Eina\+\_\+\+Matrixsparse \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}}
\item 
typedef struct \+\_\+\+Eina\+\_\+\+Matrixsparse\+\_\+\+Row \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae4c210f6fbdb9bab850ecbecc5e68cdb}{Eina\+\_\+\+Matrixsparse\+\_\+\+Row}}
\item 
typedef struct \+\_\+\+Eina\+\_\+\+Matrixsparse\+\_\+\+Cell \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}} $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gab145a6839d6255e4ef8292dc9450fc9d}{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 
void \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga7ee4663f3a3730d7c658181ea85d5c3b}{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 
void \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gac9b1c37eeaded174e59763b01ac9bcdc}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga16af5e47858b6ba348ec95633464391e}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gadb57ccb0cf043123f4a8f1b9b0058cb1}{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 
void $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}{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 
void $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga68ce4fb20de7912ec119d9b3c99b337d}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad6fcbc781ade7bd9c8f939741d95fc44}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaa6c0e879e9e707fbdbfecc66358b889f}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaac0d82ce568487fe5df4291cca2f37ea}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga0bfabda28f69e21121b5004238ea7ac5}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga074c8d356b37532fbc7f8e281fdfffed}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gadd4f9d4a84a1e97deb7bbb8bb47b5b44}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad11f7fe08b96e1dcd250d2c50d0179ac}{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_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad3e2cc761d66db8f4e6fb62e9c61ed09}{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__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga050e3217d88a9a3882b16dad4b0fac47}{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__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}} $\ast$ \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaec29352ddcf092508f0a07cc61ca895c}{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{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}\label{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}} 
\index{Sparse Matrix@{Sparse Matrix}!Eina\_Matrixsparse@{Eina\_Matrixsparse}}
\index{Eina\_Matrixsparse@{Eina\_Matrixsparse}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{Eina\_Matrixsparse}{Eina\_Matrixsparse}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga286321d3ef0e00c547a6036e2da62a27}{Eina\+\_\+\+Matrixsparse}}}

Type for a generic sparse matrix. \mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gae4c210f6fbdb9bab850ecbecc5e68cdb}\label{group__Eina__Matrixsparse__Group_gae4c210f6fbdb9bab850ecbecc5e68cdb}} 
\index{Sparse Matrix@{Sparse Matrix}!Eina\_Matrixsparse\_Row@{Eina\_Matrixsparse\_Row}}
\index{Eina\_Matrixsparse\_Row@{Eina\_Matrixsparse\_Row}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{Eina\_Matrixsparse\_Row}{Eina\_Matrixsparse\_Row}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae4c210f6fbdb9bab850ecbecc5e68cdb}{Eina\+\_\+\+Matrixsparse\+\_\+\+Row}}}

Type for a generic sparse matrix row, opaque for users. \mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}\label{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}} 
\index{Sparse Matrix@{Sparse Matrix}!Eina\_Matrixsparse\_Cell@{Eina\_Matrixsparse\_Cell}}
\index{Eina\_Matrixsparse\_Cell@{Eina\_Matrixsparse\_Cell}!Sparse Matrix@{Sparse Matrix}}
\doxysubsubsection{\texorpdfstring{Eina\_Matrixsparse\_Cell}{Eina\_Matrixsparse\_Cell}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad7c457682bae4d88a08b794720ff4226}{Eina\+\_\+\+Matrixsparse\+\_\+\+Cell}}}

Type for a generic sparse matrix cell, opaque for users. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gab145a6839d6255e4ef8292dc9450fc9d}\label{group__Eina__Matrixsparse__Group_gab145a6839d6255e4ef8292dc9450fc9d}} 
\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__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_ga7ee4663f3a3730d7c658181ea85d5c3b}{eina\+\_\+matrixsparse\+\_\+free()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga16af5e47858b6ba348ec95633464391e}{eina\+\_\+matrixsparse\+\_\+size\+\_\+set()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga074c8d356b37532fbc7f8e281fdfffed}{eina\+\_\+matrixsparse\+\_\+row\+\_\+idx\+\_\+clear()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gadd4f9d4a84a1e97deb7bbb8bb47b5b44}{eina\+\_\+matrixsparse\+\_\+column\+\_\+idx\+\_\+clear()}}, \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gad11f7fe08b96e1dcd250d2c50d0179ac}{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 N\+U\+LL} if allocation failed. 
\end{DoxyReturn}


References E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET, and E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga7ee4663f3a3730d7c658181ea85d5c3b}\label{group__Eina__Matrixsparse__Group_ga7ee4663f3a3730d7c658181ea85d5c3b}} 
\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 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 N\+U\+LL}. \\
\hline
\end{DoxyParams}


References E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+N\+O\+NE, and E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gac9b1c37eeaded174e59763b01ac9bcdc}\label{group__Eina__Matrixsparse__Group_gac9b1c37eeaded174e59763b01ac9bcdc}} 
\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 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 N\+U\+LL}, 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 N\+U\+LL}. 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 N\+U\+LL}. 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_ga16af5e47858b6ba348ec95633464391e}\label{group__Eina__Matrixsparse__Group_ga16af5e47858b6ba348ec95633464391e}} 
\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_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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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 E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gadb57ccb0cf043123f4a8f1b9b0058cb1}\label{group__Eina__Matrixsparse__Group_gadb57ccb0cf043123f4a8f1b9b0058cb1}} 
\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_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} == N\+U\+LL
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}} 

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL, and E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+N\+U\+L\+L\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}\label{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}} 
\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 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 N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Data associated with given cell.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gadb57ccb0cf043123f4a8f1b9b0058cb1}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+get()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga68ce4fb20de7912ec119d9b3c99b337d}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+get()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga68ce4fb20de7912ec119d9b3c99b337d}\label{group__Eina__Matrixsparse__Group_ga68ce4fb20de7912ec119d9b3c99b337d}} 
\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 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 N\+U\+LL} if nothing is associated.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gadb57ccb0cf043123f4a8f1b9b0058cb1}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+idx\+\_\+get()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gad6fcbc781ade7bd9c8f939741d95fc44}\label{group__Eina__Matrixsparse__Group_gad6fcbc781ade7bd9c8f939741d95fc44}} 
\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_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 N\+U\+LL}. \\
\hline
\mbox{\texttt{ out}}  & {\em row} & The returned row number; may be {\ttfamily N\+U\+LL}. \\
\hline
\mbox{\texttt{ out}}  & {\em col} & The returned column number; may be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise ({\ttfamily cell} is {\ttfamily N\+U\+LL}). 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}\label{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}} 
\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_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 N\+U\+LL}. \\
\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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise ({\itshape cell} is {\ttfamily N\+U\+LL}).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaa6c0e879e9e707fbdbfecc66358b889f}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+set()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gaac0d82ce568487fe5df4291cca2f37ea}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+replace()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gaa6c0e879e9e707fbdbfecc66358b889f}\label{group__Eina__Matrixsparse__Group_gaa6c0e879e9e707fbdbfecc66358b889f}} 
\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_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 N\+U\+LL}. \\
\hline
\mbox{\texttt{ in}}  & {\em data} & New data to set.\\
\hline
\end{DoxyParams}
In contrast to \mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}{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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise ({\itshape cell} is {\ttfamily N\+U\+LL}).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}} 

\mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga0bfabda28f69e21121b5004238ea7ac5}{eina\+\_\+matrixsparse\+\_\+data\+\_\+idx\+\_\+set()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gaac0d82ce568487fe5df4291cca2f37ea}\label{group__Eina__Matrixsparse__Group_gaac0d82ce568487fe5df4291cca2f37ea}} 
\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_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 N\+U\+LL}. \\
\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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise ({\itshape m} is {\ttfamily N\+U\+LL}, or row, column indexes are not valid).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}} 

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


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga0bfabda28f69e21121b5004238ea7ac5}\label{group__Eina__Matrixsparse__Group_ga0bfabda28f69e21121b5004238ea7ac5}} 
\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_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 N\+U\+LL}. \\
\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_gaac0d82ce568487fe5df4291cca2f37ea}{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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} otherwise ({\itshape m} is {\ttfamily N\+U\+LL}, indexes are not valid).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__Eina__Matrixsparse__Group_gae1859fd77ba22b2313a463b5339b7bc6}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+replace()}} 
\end{DoxySeeAlso}


References E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_ga074c8d356b37532fbc7f8e281fdfffed}\label{group__Eina__Matrixsparse__Group_ga074c8d356b37532fbc7f8e281fdfffed}} 
\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_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_gab145a6839d6255e4ef8292dc9450fc9d}{eina\+\_\+matrixsparse\+\_\+new()}}.

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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 E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gadd4f9d4a84a1e97deb7bbb8bb47b5b44}\label{group__Eina__Matrixsparse__Group_gadd4f9d4a84a1e97deb7bbb8bb47b5b44}} 
\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_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_gab145a6839d6255e4ef8292dc9450fc9d}{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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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 E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gad11f7fe08b96e1dcd250d2c50d0179ac}\label{group__Eina__Matrixsparse__Group_gad11f7fe08b96e1dcd250d2c50d0179ac}} 
\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_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_gab145a6839d6255e4ef8292dc9450fc9d}{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}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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 E\+I\+N\+A\+\_\+\+S\+A\+F\+E\+T\+Y\+\_\+\+O\+N\+\_\+\+F\+A\+L\+S\+E\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gad3e2cc761d66db8f4e6fb62e9c61ed09}\label{group__Eina__Matrixsparse__Group_gad3e2cc761d66db8f4e6fb62e9c61ed09}} 
\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_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 N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}} on success, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}} 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_ga050e3217d88a9a3882b16dad4b0fac47}\label{group__Eina__Matrixsparse__Group_ga050e3217d88a9a3882b16dad4b0fac47}} 
\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__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_gad6fcbc781ade7bd9c8f939741d95fc44}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+position\+\_\+get()}} and \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+data\+\_\+get()}}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em m} & The Sparse Matrix reference; must {\bfseries{not}} be {\ttfamily N\+U\+LL}. \\
\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 E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+R\+EE, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER, and F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+N\+E\+XT.

\mbox{\Hypertarget{group__Eina__Matrixsparse__Group_gaec29352ddcf092508f0a07cc61ca895c}\label{group__Eina__Matrixsparse__Group_gaec29352ddcf092508f0a07cc61ca895c}} 
\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__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_ga050e3217d88a9a3882b16dad4b0fac47}{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_gad6fcbc781ade7bd9c8f939741d95fc44}{eina\+\_\+matrixsparse\+\_\+cell\+\_\+position\+\_\+get()}} and \mbox{\hyperlink{group__Eina__Matrixsparse__Group_ga4728a4bbbc25e855b881c6159ecaf45f}{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_gaa6c0e879e9e707fbdbfecc66358b889f}{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 N\+U\+LL}. \\
\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 E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+R\+EE, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER, and F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+N\+E\+XT.

