## org.apache.mahout.cf.taste.impl.similarity.jdbc
Class SQL92JDBCInMemoryItemSimilarity

    java.lang.Object
      org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent
          org.apache.mahout.cf.taste.impl.similarity.jdbc.SQL92JDBCInMemoryItemSimilarity

All Implemented Interfaces:
  Refreshable, ItemSimilarity

Direct Known Subclasses:
  MySQLJDBCInMemoryItemSimilarity

    public class SQL92JDBCInMemoryItemSimilarity

extends AbstractJDBCComponent

Field Summary

Fields inherited from class org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent
`DEFAULT_DATASOURCE_NAME`

Constructor Summary
`SQL92JDBCInMemoryItemSimilarity()`
`SQL92JDBCInMemoryItemSimilarity(DataSource dataSource)`
`SQL92JDBCInMemoryItemSimilarity(DataSource dataSource, String getAllItemSimilaritiesSQL)`
`SQL92JDBCInMemoryItemSimilarity(String dataSourceName)`

Method Summary
`long[]` `allSimilarItemIDs(long itemID)`
`double[]` `itemSimilarities(long itemID1, long[] itemID2s)`
`double` `itemSimilarity(long itemID1, long itemID2)`
`void` `refresh(Collection<Refreshable> alreadyRefreshed)`
`protected void` `reload()`

Methods inherited from class org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent
`checkNotNullAndLog, checkNotNullAndLog, getFetchSize, lookupDataSource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQL92JDBCInMemoryItemSimilarity

    public SQL92JDBCInMemoryItemSimilarity()
                                    throws TasteException

Throws:
  `TasteException`

### SQL92JDBCInMemoryItemSimilarity

    public SQL92JDBCInMemoryItemSimilarity(String dataSourceName)
                                    throws TasteException

Throws:
  `TasteException`

### SQL92JDBCInMemoryItemSimilarity

    public SQL92JDBCInMemoryItemSimilarity(DataSource dataSource)

### SQL92JDBCInMemoryItemSimilarity

    public SQL92JDBCInMemoryItemSimilarity(DataSource dataSource,
                                           String getAllItemSimilaritiesSQL)

Method Detail

### itemSimilarity

    public double itemSimilarity(long itemID1,
                                 long itemID2)
                          throws TasteException

  Specified by:
    `itemSimilarity` in interface `ItemSimilarity`
  Throws:
    `TasteException`

### itemSimilarities

    public double[] itemSimilarities(long itemID1,
                                     long[] itemID2s)
                              throws TasteException

  Specified by:
    `itemSimilarities` in interface `ItemSimilarity`
  Throws:
    `TasteException`

### allSimilarItemIDs

    public long[] allSimilarItemIDs(long itemID)
                             throws TasteException

  Specified by:
    `allSimilarItemIDs` in interface `ItemSimilarity`
  Throws:
    `TasteException`

### refresh

    public void refresh(Collection<Refreshable> alreadyRefreshed)

  Specified by:
    `refresh` in interface `Refreshable`

### reload

    protected void reload()

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.