deps/kb_meme/meme-5.0.1/src/order.c
/***********************************************************************
 * Create an empty order-and-spacing object.
 ***********************************************************************/
Create an empty order-and-spacing object.
Create an empty order - and - spacing object .
ORDER_T* create_empty_order
  (int    num_alloc,
   double sequence_p)
{
  ORDER_T* new_order;
  new_order = (ORDER_T*)mm_malloc(sizeof(ORDER_T));
  new_order->num_alloc = num_alloc;
  new_order->num_occurs = 0;
  new_order->pvalue = sequence_p;
  new_order->distinct = rbtree_create(rbtree_intcmp, rbtree_intcpy, free, NULL, NULL);
  new_order->motif_occurs = (int*)mm_malloc(sizeof(int) * (num_alloc));
  memset(new_order->motif_occurs, 0, sizeof(int) * (num_alloc));
  new_order->motif_spacers = (int*)mm_malloc(sizeof(int) * (num_alloc + 1));
  memset(new_order->motif_spacers, 0, sizeof(int) * (num_alloc + 1));
  return new_order;
}
ORDER_T * create_empty_order ( int num_alloc , double sequence_p ) { ORDER_T * new_order ; new_order = ( ORDER_T * ) mm_malloc ( sizeof ( ORDER_T ) ) ; new_order -> num_alloc = num_alloc ; new_order -> num_occurs = 0 ; new_order -> pvalue = sequence_p ; new_order -> distinct = rbtree_create ( rbtree_intcmp , rbtree_intcpy , free , NULL , NULL ) ; new_order -> motif_occurs = ( int * ) mm_malloc ( sizeof ( int ) * ( num_alloc ) ) ; memset ( new_order -> motif_occurs , 0 , sizeof ( int ) * ( num_alloc ) ) ; new_order -> motif_spacers = ( int * ) mm_malloc ( sizeof ( int ) * ( num_alloc + 1 ) ) ; memset ( new_order -> motif_spacers , 0 , sizeof ( int ) * ( num_alloc + 1 ) ) ; return new_order ; }
Create an empty order-and-spacing object.
Create an empty order - and - spacing object .
// Allocate the data structure.  // Allocate the set.  // Allocate the arrays.  // Add 1 for end transition.