-- GENERATED by C->Haskell Compiler, version 0.28.3 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/IGraph/Internal/Motif.chs" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module IGraph.Internal.Motif where
import qualified Foreign.C.Types as C2HSImp



import qualified Foreign.Marshal.Utils as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import Foreign
import Foreign.C.Types

import IGraph.Internal.Graph
{-# LINE 9 "src/IGraph/Internal/Motif.chs" #-}

import IGraph.Internal.Selector
{-# LINE 10 "src/IGraph/Internal/Motif.chs" #-}

import IGraph.Internal.Constants
{-# LINE 11 "src/IGraph/Internal/Motif.chs" #-}

import IGraph.Internal.Data
{-# LINE 12 "src/IGraph/Internal/Motif.chs" #-}




igraphTriadCensus :: (IGraph) -> (Vector) -> IO ((Int))
igraphTriadCensus a1 a2 =
  (withIGraph) a1 $ \a1' ->
  (withVector) a2 $ \a2' ->
  igraphTriadCensus'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 17 "src/IGraph/Internal/Motif.chs" #-}


igraphMotifsRandesu :: (IGraph) -> (Vector) -> (Int) -> (Vector) -> IO ((Int))
igraphMotifsRandesu a1 a2 a3 a4 =
  (withIGraph) a1 $ \a1' ->
  (withVector) a2 $ \a2' ->
  let {a3' = fromIntegral a3} in
  (withVector) a4 $ \a4' ->
  igraphMotifsRandesu'_ a1' a2' a3' a4' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 20 "src/IGraph/Internal/Motif.chs" #-}


foreign import ccall safe "IGraph/Internal/Motif.chs.h igraph_triad_census"
  igraphTriadCensus'_ :: ((C2HSImp.Ptr (IGraph)) -> ((C2HSImp.Ptr (Vector)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "IGraph/Internal/Motif.chs.h igraph_motifs_randesu"
  igraphMotifsRandesu'_ :: ((C2HSImp.Ptr (IGraph)) -> ((C2HSImp.Ptr (Vector)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (Vector)) -> (IO C2HSImp.CInt)))))