id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
54,600
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRulePersistenceImpl.java
CommerceDiscountRulePersistenceImpl.findAll
@Override public List<CommerceDiscountRule> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceDiscountRule> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscountRule", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce discount rules. @return the commerce discount rules
[ "Returns", "all", "the", "commerce", "discount", "rules", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountRulePersistenceImpl.java#L1142-L1145
54,601
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/base/CommerceNotificationTemplateServiceBaseImpl.java
CommerceNotificationTemplateServiceBaseImpl.setCommerceNotificationQueueEntryService
public void setCommerceNotificationQueueEntryService( com.liferay.commerce.notification.service.CommerceNotificationQueueEntryService commerceNotificationQueueEntryService) { this.commerceNotificationQueueEntryService = commerceNotificationQueueEntryService; }
java
public void setCommerceNotificationQueueEntryService( com.liferay.commerce.notification.service.CommerceNotificationQueueEntryService commerceNotificationQueueEntryService) { this.commerceNotificationQueueEntryService = commerceNotificationQueueEntryService; }
[ "public", "void", "setCommerceNotificationQueueEntryService", "(", "com", ".", "liferay", ".", "commerce", ".", "notification", ".", "service", ".", "CommerceNotificationQueueEntryService", "commerceNotificationQueueEntryService", ")", "{", "this", ".", "commerceNotificationQ...
Sets the commerce notification queue entry remote service. @param commerceNotificationQueueEntryService the commerce notification queue entry remote service
[ "Sets", "the", "commerce", "notification", "queue", "entry", "remote", "service", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/base/CommerceNotificationTemplateServiceBaseImpl.java#L133-L136
54,602
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/CPDefinitionSpecificationOptionValueLocalServiceWrapper.java
CPDefinitionSpecificationOptionValueLocalServiceWrapper.getCPDefinitionSpecificationOptionValue
@Override public com.liferay.commerce.product.model.CPDefinitionSpecificationOptionValue getCPDefinitionSpecificationOptionValue( long CPDefinitionSpecificationOptionValueId) throws com.liferay.portal.kernel.exception.PortalException { return _cpDefinitionSpecificationOptionValueLocalService.getCPDefinitionSpeci...
java
@Override public com.liferay.commerce.product.model.CPDefinitionSpecificationOptionValue getCPDefinitionSpecificationOptionValue( long CPDefinitionSpecificationOptionValueId) throws com.liferay.portal.kernel.exception.PortalException { return _cpDefinitionSpecificationOptionValueLocalService.getCPDefinitionSpeci...
[ "@", "Override", "public", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "model", ".", "CPDefinitionSpecificationOptionValue", "getCPDefinitionSpecificationOptionValue", "(", "long", "CPDefinitionSpecificationOptionValueId", ")", "throws", "com", ".", "life...
Returns the cp definition specification option value with the primary key. @param CPDefinitionSpecificationOptionValueId the primary key of the cp definition specification option value @return the cp definition specification option value @throws PortalException if a cp definition specification option value with the pr...
[ "Returns", "the", "cp", "definition", "specification", "option", "value", "with", "the", "primary", "key", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/CPDefinitionSpecificationOptionValueLocalServiceWrapper.java#L247-L252
54,603
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/base/CommerceWishListItemLocalServiceBaseImpl.java
CommerceWishListItemLocalServiceBaseImpl.deleteCommerceWishListItem
@Indexable(type = IndexableType.DELETE) @Override public CommerceWishListItem deleteCommerceWishListItem( long commerceWishListItemId) throws PortalException { return commerceWishListItemPersistence.remove(commerceWishListItemId); }
java
@Indexable(type = IndexableType.DELETE) @Override public CommerceWishListItem deleteCommerceWishListItem( long commerceWishListItemId) throws PortalException { return commerceWishListItemPersistence.remove(commerceWishListItemId); }
[ "@", "Indexable", "(", "type", "=", "IndexableType", ".", "DELETE", ")", "@", "Override", "public", "CommerceWishListItem", "deleteCommerceWishListItem", "(", "long", "commerceWishListItemId", ")", "throws", "PortalException", "{", "return", "commerceWishListItemPersisten...
Deletes the commerce wish list item with the primary key from the database. Also notifies the appropriate model listeners. @param commerceWishListItemId the primary key of the commerce wish list item @return the commerce wish list item that was removed @throws PortalException if a commerce wish list item with the prim...
[ "Deletes", "the", "commerce", "wish", "list", "item", "with", "the", "primary", "key", "from", "the", "database", ".", "Also", "notifies", "the", "appropriate", "model", "listeners", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/base/CommerceWishListItemLocalServiceBaseImpl.java#L113-L118
54,604
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/base/CommerceWishListItemLocalServiceBaseImpl.java
CommerceWishListItemLocalServiceBaseImpl.deleteCommerceWishListItem
@Indexable(type = IndexableType.DELETE) @Override public CommerceWishListItem deleteCommerceWishListItem( CommerceWishListItem commerceWishListItem) { return commerceWishListItemPersistence.remove(commerceWishListItem); }
java
@Indexable(type = IndexableType.DELETE) @Override public CommerceWishListItem deleteCommerceWishListItem( CommerceWishListItem commerceWishListItem) { return commerceWishListItemPersistence.remove(commerceWishListItem); }
[ "@", "Indexable", "(", "type", "=", "IndexableType", ".", "DELETE", ")", "@", "Override", "public", "CommerceWishListItem", "deleteCommerceWishListItem", "(", "CommerceWishListItem", "commerceWishListItem", ")", "{", "return", "commerceWishListItemPersistence", ".", "remo...
Deletes the commerce wish list item from the database. Also notifies the appropriate model listeners. @param commerceWishListItem the commerce wish list item @return the commerce wish list item that was removed
[ "Deletes", "the", "commerce", "wish", "list", "item", "from", "the", "database", ".", "Also", "notifies", "the", "appropriate", "model", "listeners", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/base/CommerceWishListItemLocalServiceBaseImpl.java#L126-L131
54,605
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/CPInstanceLocalServiceUtil.java
CPInstanceLocalServiceUtil.getCPInstance
public static com.liferay.commerce.product.model.CPInstance getCPInstance( long CPInstanceId) throws com.liferay.portal.kernel.exception.PortalException { return getService().getCPInstance(CPInstanceId); }
java
public static com.liferay.commerce.product.model.CPInstance getCPInstance( long CPInstanceId) throws com.liferay.portal.kernel.exception.PortalException { return getService().getCPInstance(CPInstanceId); }
[ "public", "static", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "model", ".", "CPInstance", "getCPInstance", "(", "long", "CPInstanceId", ")", "throws", "com", ".", "liferay", ".", "portal", ".", "kernel", ".", "exception", ".", "PortalExcep...
Returns the cp instance with the primary key. @param CPInstanceId the primary key of the cp instance @return the cp instance @throws PortalException if a cp instance with the primary key could not be found
[ "Returns", "the", "cp", "instance", "with", "the", "primary", "key", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/CPInstanceLocalServiceUtil.java#L348-L352
54,606
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/base/CommerceWarehouseLocalServiceBaseImpl.java
CommerceWarehouseLocalServiceBaseImpl.deleteCommerceWarehouse
@Indexable(type = IndexableType.DELETE) @Override public CommerceWarehouse deleteCommerceWarehouse(long commerceWarehouseId) throws PortalException { return commerceWarehousePersistence.remove(commerceWarehouseId); }
java
@Indexable(type = IndexableType.DELETE) @Override public CommerceWarehouse deleteCommerceWarehouse(long commerceWarehouseId) throws PortalException { return commerceWarehousePersistence.remove(commerceWarehouseId); }
[ "@", "Indexable", "(", "type", "=", "IndexableType", ".", "DELETE", ")", "@", "Override", "public", "CommerceWarehouse", "deleteCommerceWarehouse", "(", "long", "commerceWarehouseId", ")", "throws", "PortalException", "{", "return", "commerceWarehousePersistence", ".", ...
Deletes the commerce warehouse with the primary key from the database. Also notifies the appropriate model listeners. @param commerceWarehouseId the primary key of the commerce warehouse @return the commerce warehouse that was removed @throws PortalException if a commerce warehouse with the primary key could not be fo...
[ "Deletes", "the", "commerce", "warehouse", "with", "the", "primary", "key", "from", "the", "database", ".", "Also", "notifies", "the", "appropriate", "model", "listeners", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/base/CommerceWarehouseLocalServiceBaseImpl.java#L135-L140
54,607
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/base/CommerceWarehouseLocalServiceBaseImpl.java
CommerceWarehouseLocalServiceBaseImpl.runSQL
protected void runSQL(String sql) { try { DataSource dataSource = commerceWarehousePersistence.getDataSource(); DB db = DBManagerUtil.getDB(); sql = db.buildSQL(sql); sql = PortalUtil.transformSQL(sql); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql); sqlUpdate.upda...
java
protected void runSQL(String sql) { try { DataSource dataSource = commerceWarehousePersistence.getDataSource(); DB db = DBManagerUtil.getDB(); sql = db.buildSQL(sql); sql = PortalUtil.transformSQL(sql); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql); sqlUpdate.upda...
[ "protected", "void", "runSQL", "(", "String", "sql", ")", "{", "try", "{", "DataSource", "dataSource", "=", "commerceWarehousePersistence", ".", "getDataSource", "(", ")", ";", "DB", "db", "=", "DBManagerUtil", ".", "getDB", "(", ")", ";", "sql", "=", "db"...
Performs a SQL query. @param sql the sql query
[ "Performs", "a", "SQL", "query", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/base/CommerceWarehouseLocalServiceBaseImpl.java#L1289-L1306
54,608
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java
CPDefinitionOptionValueRelPersistenceImpl.cacheResult
@Override public void cacheResult( CPDefinitionOptionValueRel cpDefinitionOptionValueRel) { entityCache.putResult(CPDefinitionOptionValueRelModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionOptionValueRelImpl.class, cpDefinitionOptionValueRel.getPrimaryKey(), cpDefinitionOptionValueRel); finderCache.putResul...
java
@Override public void cacheResult( CPDefinitionOptionValueRel cpDefinitionOptionValueRel) { entityCache.putResult(CPDefinitionOptionValueRelModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionOptionValueRelImpl.class, cpDefinitionOptionValueRel.getPrimaryKey(), cpDefinitionOptionValueRel); finderCache.putResul...
[ "@", "Override", "public", "void", "cacheResult", "(", "CPDefinitionOptionValueRel", "cpDefinitionOptionValueRel", ")", "{", "entityCache", ".", "putResult", "(", "CPDefinitionOptionValueRelModelImpl", ".", "ENTITY_CACHE_ENABLED", ",", "CPDefinitionOptionValueRelImpl", ".", "...
Caches the cp definition option value rel in the entity cache if it is enabled. @param cpDefinitionOptionValueRel the cp definition option value rel
[ "Caches", "the", "cp", "definition", "option", "value", "rel", "in", "the", "entity", "cache", "if", "it", "is", "enabled", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java#L3904-L3925
54,609
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java
CPDefinitionOptionValueRelPersistenceImpl.cacheResult
@Override public void cacheResult( List<CPDefinitionOptionValueRel> cpDefinitionOptionValueRels) { for (CPDefinitionOptionValueRel cpDefinitionOptionValueRel : cpDefinitionOptionValueRels) { if (entityCache.getResult( CPDefinitionOptionValueRelModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionOptionValueR...
java
@Override public void cacheResult( List<CPDefinitionOptionValueRel> cpDefinitionOptionValueRels) { for (CPDefinitionOptionValueRel cpDefinitionOptionValueRel : cpDefinitionOptionValueRels) { if (entityCache.getResult( CPDefinitionOptionValueRelModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionOptionValueR...
[ "@", "Override", "public", "void", "cacheResult", "(", "List", "<", "CPDefinitionOptionValueRel", ">", "cpDefinitionOptionValueRels", ")", "{", "for", "(", "CPDefinitionOptionValueRel", "cpDefinitionOptionValueRel", ":", "cpDefinitionOptionValueRels", ")", "{", "if", "(",...
Caches the cp definition option value rels in the entity cache if it is enabled. @param cpDefinitionOptionValueRels the cp definition option value rels
[ "Caches", "the", "cp", "definition", "option", "value", "rels", "in", "the", "entity", "cache", "if", "it", "is", "enabled", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java#L3932-L3946
54,610
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java
CPDefinitionOptionValueRelPersistenceImpl.clearCache
@Override public void clearCache() { entityCache.clearCache(CPDefinitionOptionValueRelImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
java
@Override public void clearCache() { entityCache.clearCache(CPDefinitionOptionValueRelImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
[ "@", "Override", "public", "void", "clearCache", "(", ")", "{", "entityCache", ".", "clearCache", "(", "CPDefinitionOptionValueRelImpl", ".", "class", ")", ";", "finderCache", ".", "clearCache", "(", "FINDER_CLASS_NAME_ENTITY", ")", ";", "finderCache", ".", "clear...
Clears the cache for all cp definition option value rels. <p> The {@link EntityCache} and {@link FinderCache} are both cleared by this method. </p>
[ "Clears", "the", "cache", "for", "all", "cp", "definition", "option", "value", "rels", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java#L3955-L3962
54,611
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java
CPDefinitionOptionValueRelPersistenceImpl.findAll
@Override public List<CPDefinitionOptionValueRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CPDefinitionOptionValueRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CPDefinitionOptionValueRel", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the cp definition option value rels. @return the cp definition option value rels
[ "Returns", "all", "the", "cp", "definition", "option", "value", "rels", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionOptionValueRelPersistenceImpl.java#L4638-L4641
54,612
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/base/CPDefinitionOptionRelLocalServiceBaseImpl.java
CPDefinitionOptionRelLocalServiceBaseImpl.deleteCPDefinitionOptionRel
@Indexable(type = IndexableType.DELETE) @Override public CPDefinitionOptionRel deleteCPDefinitionOptionRel( long CPDefinitionOptionRelId) throws PortalException { return cpDefinitionOptionRelPersistence.remove(CPDefinitionOptionRelId); }
java
@Indexable(type = IndexableType.DELETE) @Override public CPDefinitionOptionRel deleteCPDefinitionOptionRel( long CPDefinitionOptionRelId) throws PortalException { return cpDefinitionOptionRelPersistence.remove(CPDefinitionOptionRelId); }
[ "@", "Indexable", "(", "type", "=", "IndexableType", ".", "DELETE", ")", "@", "Override", "public", "CPDefinitionOptionRel", "deleteCPDefinitionOptionRel", "(", "long", "CPDefinitionOptionRelId", ")", "throws", "PortalException", "{", "return", "cpDefinitionOptionRelPersi...
Deletes the cp definition option rel with the primary key from the database. Also notifies the appropriate model listeners. @param CPDefinitionOptionRelId the primary key of the cp definition option rel @return the cp definition option rel that was removed @throws PortalException if a cp definition option rel with the...
[ "Deletes", "the", "cp", "definition", "option", "rel", "with", "the", "primary", "key", "from", "the", "database", ".", "Also", "notifies", "the", "appropriate", "model", "listeners", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/base/CPDefinitionOptionRelLocalServiceBaseImpl.java#L143-L148
54,613
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/base/CPDefinitionOptionRelLocalServiceBaseImpl.java
CPDefinitionOptionRelLocalServiceBaseImpl.getCPDefinitionOptionRelsByUuidAndCompanyId
@Override public List<CPDefinitionOptionRel> getCPDefinitionOptionRelsByUuidAndCompanyId( String uuid, long companyId, int start, int end, OrderByComparator<CPDefinitionOptionRel> orderByComparator) { return cpDefinitionOptionRelPersistence.findByUuid_C(uuid, companyId, start, end, orderByComparator); }
java
@Override public List<CPDefinitionOptionRel> getCPDefinitionOptionRelsByUuidAndCompanyId( String uuid, long companyId, int start, int end, OrderByComparator<CPDefinitionOptionRel> orderByComparator) { return cpDefinitionOptionRelPersistence.findByUuid_C(uuid, companyId, start, end, orderByComparator); }
[ "@", "Override", "public", "List", "<", "CPDefinitionOptionRel", ">", "getCPDefinitionOptionRelsByUuidAndCompanyId", "(", "String", "uuid", ",", "long", "companyId", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CPDefinitionOptionRel", ">", ...
Returns a range of cp definition option rels matching the UUID and company. @param uuid the UUID of the cp definition option rels @param companyId the primary key of the company @param start the lower bound of the range of cp definition option rels @param end the upper bound of the range of cp definition option rels (...
[ "Returns", "a", "range", "of", "cp", "definition", "option", "rels", "matching", "the", "UUID", "and", "company", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/base/CPDefinitionOptionRelLocalServiceBaseImpl.java#L407-L413
54,614
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/base/CommerceShipmentItemLocalServiceBaseImpl.java
CommerceShipmentItemLocalServiceBaseImpl.dynamicQuery
@Override public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end) { return commerceShipmentItemPersistence.findWithDynamicQuery(dynamicQuery, start, end); }
java
@Override public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end) { return commerceShipmentItemPersistence.findWithDynamicQuery(dynamicQuery, start, end); }
[ "@", "Override", "public", "<", "T", ">", "List", "<", "T", ">", "dynamicQuery", "(", "DynamicQuery", "dynamicQuery", ",", "int", "start", ",", "int", "end", ")", "{", "return", "commerceShipmentItemPersistence", ".", "findWithDynamicQuery", "(", "dynamicQuery",...
Performs a dynamic query on the database and returns a range of the matching rows. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first resu...
[ "Performs", "a", "dynamic", "query", "on", "the", "database", "and", "returns", "a", "range", "of", "the", "matching", "rows", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/base/CommerceShipmentItemLocalServiceBaseImpl.java#L185-L190
54,615
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.cacheResult
@Override public void cacheResult(CommerceDiscount commerceDiscount) { entityCache.putResult(CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED, CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey(), commerceDiscount); finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, new Object[] { commerceDisco...
java
@Override public void cacheResult(CommerceDiscount commerceDiscount) { entityCache.putResult(CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED, CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey(), commerceDiscount); finderCache.putResult(FINDER_PATH_FETCH_BY_UUID_G, new Object[] { commerceDisco...
[ "@", "Override", "public", "void", "cacheResult", "(", "CommerceDiscount", "commerceDiscount", ")", "{", "entityCache", ".", "putResult", "(", "CommerceDiscountModelImpl", ".", "ENTITY_CACHE_ENABLED", ",", "CommerceDiscountImpl", ".", "class", ",", "commerceDiscount", "...
Caches the commerce discount in the entity cache if it is enabled. @param commerceDiscount the commerce discount
[ "Caches", "the", "commerce", "discount", "in", "the", "entity", "cache", "if", "it", "is", "enabled", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L4530-L4542
54,616
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.cacheResult
@Override public void cacheResult(List<CommerceDiscount> commerceDiscounts) { for (CommerceDiscount commerceDiscount : commerceDiscounts) { if (entityCache.getResult( CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED, CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey()) == null) { cach...
java
@Override public void cacheResult(List<CommerceDiscount> commerceDiscounts) { for (CommerceDiscount commerceDiscount : commerceDiscounts) { if (entityCache.getResult( CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED, CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey()) == null) { cach...
[ "@", "Override", "public", "void", "cacheResult", "(", "List", "<", "CommerceDiscount", ">", "commerceDiscounts", ")", "{", "for", "(", "CommerceDiscount", "commerceDiscount", ":", "commerceDiscounts", ")", "{", "if", "(", "entityCache", ".", "getResult", "(", "...
Caches the commerce discounts in the entity cache if it is enabled. @param commerceDiscounts the commerce discounts
[ "Caches", "the", "commerce", "discounts", "in", "the", "entity", "cache", "if", "it", "is", "enabled", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L4549-L4562
54,617
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.clearCache
@Override public void clearCache() { entityCache.clearCache(CommerceDiscountImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
java
@Override public void clearCache() { entityCache.clearCache(CommerceDiscountImpl.class); finderCache.clearCache(FINDER_CLASS_NAME_ENTITY); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); }
[ "@", "Override", "public", "void", "clearCache", "(", ")", "{", "entityCache", ".", "clearCache", "(", "CommerceDiscountImpl", ".", "class", ")", ";", "finderCache", ".", "clearCache", "(", "FINDER_CLASS_NAME_ENTITY", ")", ";", "finderCache", ".", "clearCache", ...
Clears the cache for all commerce discounts. <p> The {@link EntityCache} and {@link FinderCache} are both cleared by this method. </p>
[ "Clears", "the", "cache", "for", "all", "commerce", "discounts", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L4571-L4578
54,618
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.clearCache
@Override public void clearCache(CommerceDiscount commerceDiscount) { entityCache.removeResult(CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED, CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey()); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAM...
java
@Override public void clearCache(CommerceDiscount commerceDiscount) { entityCache.removeResult(CommerceDiscountModelImpl.ENTITY_CACHE_ENABLED, CommerceDiscountImpl.class, commerceDiscount.getPrimaryKey()); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAM...
[ "@", "Override", "public", "void", "clearCache", "(", "CommerceDiscount", "commerceDiscount", ")", "{", "entityCache", ".", "removeResult", "(", "CommerceDiscountModelImpl", ".", "ENTITY_CACHE_ENABLED", ",", "CommerceDiscountImpl", ".", "class", ",", "commerceDiscount", ...
Clears the cache for the commerce discount. <p> The {@link EntityCache} and {@link FinderCache} are both cleared by this method. </p>
[ "Clears", "the", "cache", "for", "the", "commerce", "discount", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L4587-L4597
54,619
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.findAll
@Override public List<CommerceDiscount> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceDiscount> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscount", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce discounts. @return the commerce discounts
[ "Returns", "all", "the", "commerce", "discounts", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L5155-L5158
54,620
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
AuthorizationCodeFlow.newTokenRequest
public AuthorizationCodeTokenRequest newTokenRequest(String authorizationCode) { return new AuthorizationCodeTokenRequest(transport, jsonFactory, new GenericUrl(tokenServerEncodedUrl), authorizationCode).setClientAuthentication( clientAuthentication).setRequestInitializer(requestInitializer).setScop...
java
public AuthorizationCodeTokenRequest newTokenRequest(String authorizationCode) { return new AuthorizationCodeTokenRequest(transport, jsonFactory, new GenericUrl(tokenServerEncodedUrl), authorizationCode).setClientAuthentication( clientAuthentication).setRequestInitializer(requestInitializer).setScop...
[ "public", "AuthorizationCodeTokenRequest", "newTokenRequest", "(", "String", "authorizationCode", ")", "{", "return", "new", "AuthorizationCodeTokenRequest", "(", "transport", ",", "jsonFactory", ",", "new", "GenericUrl", "(", "tokenServerEncodedUrl", ")", ",", "authoriza...
Returns a new instance of an authorization code token request based on the given authorization code. <p> This is used to make a request for an access token using the authorization code. It uses {@link #getTransport()}, {@link #getJsonFactory()}, {@link #getTokenServerEncodedUrl()}, {@link #getClientAuthentication()}, ...
[ "Returns", "a", "new", "instance", "of", "an", "authorization", "code", "token", "request", "based", "on", "the", "given", "authorization", "code", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java#L208-L212
54,621
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
AuthorizationCodeFlow.createAndStoreCredential
@SuppressWarnings("deprecation") public Credential createAndStoreCredential(TokenResponse response, String userId) throws IOException { Credential credential = newCredential(userId).setFromTokenResponse(response); if (credentialStore != null) { credentialStore.store(userId, credential); } ...
java
@SuppressWarnings("deprecation") public Credential createAndStoreCredential(TokenResponse response, String userId) throws IOException { Credential credential = newCredential(userId).setFromTokenResponse(response); if (credentialStore != null) { credentialStore.store(userId, credential); } ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "Credential", "createAndStoreCredential", "(", "TokenResponse", "response", ",", "String", "userId", ")", "throws", "IOException", "{", "Credential", "credential", "=", "newCredential", "(", "userId", ")"...
Creates a new credential for the given user ID based on the given token response and stores it in the credential store. @param response token response @param userId user ID or {@code null} if not using a persisted credential store @return newly created credential
[ "Creates", "a", "new", "credential", "for", "the", "given", "user", "ID", "based", "on", "the", "given", "token", "response", "and", "stores", "it", "in", "the", "credential", "store", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java#L222-L236
54,622
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
AuthorizationCodeFlow.loadCredential
@SuppressWarnings("deprecation") public Credential loadCredential(String userId) throws IOException { // No requests need to be performed when userId is not specified. if (isNullOrEmpty(userId)) { return null; } if (credentialDataStore == null && credentialStore == null) { return null; ...
java
@SuppressWarnings("deprecation") public Credential loadCredential(String userId) throws IOException { // No requests need to be performed when userId is not specified. if (isNullOrEmpty(userId)) { return null; } if (credentialDataStore == null && credentialStore == null) { return null; ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "public", "Credential", "loadCredential", "(", "String", "userId", ")", "throws", "IOException", "{", "// No requests need to be performed when userId is not specified.", "if", "(", "isNullOrEmpty", "(", "userId", ")", ...
Loads the credential of the given user ID from the credential store. @param userId user ID or {@code null} if not using a persisted credential store @return credential found in the credential store of the given user ID or {@code null} for none found
[ "Loads", "the", "credential", "of", "the", "given", "user", "ID", "from", "the", "credential", "store", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java#L245-L269
54,623
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
AuthorizationCodeFlow.newCredential
@SuppressWarnings("deprecation") private Credential newCredential(String userId) { Credential.Builder builder = new Credential.Builder(method).setTransport(transport) .setJsonFactory(jsonFactory) .setTokenServerEncodedUrl(tokenServerEncodedUrl) .setClientAuthentication(clientAuthentication...
java
@SuppressWarnings("deprecation") private Credential newCredential(String userId) { Credential.Builder builder = new Credential.Builder(method).setTransport(transport) .setJsonFactory(jsonFactory) .setTokenServerEncodedUrl(tokenServerEncodedUrl) .setClientAuthentication(clientAuthentication...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "private", "Credential", "newCredential", "(", "String", "userId", ")", "{", "Credential", ".", "Builder", "builder", "=", "new", "Credential", ".", "Builder", "(", "method", ")", ".", "setTransport", "(", ...
Returns a new credential instance based on the given user ID. @param userId user ID or {@code null} if not using a persisted credential store
[ "Returns", "a", "new", "credential", "instance", "based", "on", "the", "given", "user", "ID", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java#L276-L292
54,624
googleapis/google-oauth-java-client
google-oauth-client-appengine/src/main/java/com/google/api/client/extensions/appengine/auth/AppEngineServletUtils.java
AppEngineServletUtils.getUserId
static final String getUserId() { UserService userService = UserServiceFactory.getUserService(); User loggedIn = userService.getCurrentUser(); Preconditions.checkState(loggedIn != null, "This servlet requires the user to be logged in."); return loggedIn.getUserId(); }
java
static final String getUserId() { UserService userService = UserServiceFactory.getUserService(); User loggedIn = userService.getCurrentUser(); Preconditions.checkState(loggedIn != null, "This servlet requires the user to be logged in."); return loggedIn.getUserId(); }
[ "static", "final", "String", "getUserId", "(", ")", "{", "UserService", "userService", "=", "UserServiceFactory", ".", "getUserService", "(", ")", ";", "User", "loggedIn", "=", "userService", ".", "getCurrentUser", "(", ")", ";", "Preconditions", ".", "checkStat...
Return the user id for the currently logged in user.
[ "Return", "the", "user", "id", "for", "the", "currently", "logged", "in", "user", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client-appengine/src/main/java/com/google/api/client/extensions/appengine/auth/AppEngineServletUtils.java#L39-L44
54,625
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth/AbstractOAuthGetToken.java
AbstractOAuthGetToken.execute
public final OAuthCredentialsResponse execute() throws IOException { HttpRequestFactory requestFactory = transport.createRequestFactory(); HttpRequest request = requestFactory.buildRequest(usePost ? HttpMethods.POST : HttpMethods.GET, this, null); createParameters().intercept(request); HttpRespo...
java
public final OAuthCredentialsResponse execute() throws IOException { HttpRequestFactory requestFactory = transport.createRequestFactory(); HttpRequest request = requestFactory.buildRequest(usePost ? HttpMethods.POST : HttpMethods.GET, this, null); createParameters().intercept(request); HttpRespo...
[ "public", "final", "OAuthCredentialsResponse", "execute", "(", ")", "throws", "IOException", "{", "HttpRequestFactory", "requestFactory", "=", "transport", ".", "createRequestFactory", "(", ")", ";", "HttpRequest", "request", "=", "requestFactory", ".", "buildRequest", ...
Executes the HTTP request for a temporary or long-lived token. @return OAuth credentials response object
[ "Executes", "the", "HTTP", "request", "for", "a", "temporary", "or", "long", "-", "lived", "token", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth/AbstractOAuthGetToken.java#L68-L78
54,626
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth/AbstractOAuthGetToken.java
AbstractOAuthGetToken.createParameters
public OAuthParameters createParameters() { OAuthParameters result = new OAuthParameters(); result.consumerKey = consumerKey; result.signer = signer; return result; }
java
public OAuthParameters createParameters() { OAuthParameters result = new OAuthParameters(); result.consumerKey = consumerKey; result.signer = signer; return result; }
[ "public", "OAuthParameters", "createParameters", "(", ")", "{", "OAuthParameters", "result", "=", "new", "OAuthParameters", "(", ")", ";", "result", ".", "consumerKey", "=", "consumerKey", ";", "result", ".", "signer", "=", "signer", ";", "return", "result", "...
Returns a new instance of the OAuth authentication provider. Subclasses may override by calling this super implementation and then adding OAuth parameters.
[ "Returns", "a", "new", "instance", "of", "the", "OAuth", "authentication", "provider", ".", "Subclasses", "may", "override", "by", "calling", "this", "super", "implementation", "and", "then", "adding", "OAuth", "parameters", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth/AbstractOAuthGetToken.java#L84-L89
54,627
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/TokenRequest.java
TokenRequest.setTokenServerUrl
public TokenRequest setTokenServerUrl(GenericUrl tokenServerUrl) { this.tokenServerUrl = tokenServerUrl; Preconditions.checkArgument(tokenServerUrl.getFragment() == null); return this; }
java
public TokenRequest setTokenServerUrl(GenericUrl tokenServerUrl) { this.tokenServerUrl = tokenServerUrl; Preconditions.checkArgument(tokenServerUrl.getFragment() == null); return this; }
[ "public", "TokenRequest", "setTokenServerUrl", "(", "GenericUrl", "tokenServerUrl", ")", "{", "this", ".", "tokenServerUrl", "=", "tokenServerUrl", ";", "Preconditions", ".", "checkArgument", "(", "tokenServerUrl", ".", "getFragment", "(", ")", "==", "null", ")", ...
Sets the token server URL. <p> Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else. </p>
[ "Sets", "the", "token", "server", "URL", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/TokenRequest.java#L195-L199
54,628
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/TokenRequest.java
TokenRequest.executeUnparsed
public final HttpResponse executeUnparsed() throws IOException { // must set clientAuthentication as last execute interceptor in case it needs to sign request HttpRequestFactory requestFactory = transport.createRequestFactory(new HttpRequestInitializer() { public void initialize(HttpRequest r...
java
public final HttpResponse executeUnparsed() throws IOException { // must set clientAuthentication as last execute interceptor in case it needs to sign request HttpRequestFactory requestFactory = transport.createRequestFactory(new HttpRequestInitializer() { public void initialize(HttpRequest r...
[ "public", "final", "HttpResponse", "executeUnparsed", "(", ")", "throws", "IOException", "{", "// must set clientAuthentication as last execute interceptor in case it needs to sign request", "HttpRequestFactory", "requestFactory", "=", "transport", ".", "createRequestFactory", "(", ...
Executes request for an access token, and returns the HTTP response. <p> To execute and parse the response to {@link TokenResponse}, instead use {@link #execute()}. </p> <p> Callers should call {@link HttpResponse#disconnect} when the returned HTTP response object is no longer needed. However, {@link HttpResponse#dis...
[ "Executes", "request", "for", "an", "access", "token", "and", "returns", "the", "HTTP", "response", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/TokenRequest.java#L295-L327
54,629
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java
Credential.setAccessToken
public Credential setAccessToken(String accessToken) { lock.lock(); try { this.accessToken = accessToken; } finally { lock.unlock(); } return this; }
java
public Credential setAccessToken(String accessToken) { lock.lock(); try { this.accessToken = accessToken; } finally { lock.unlock(); } return this; }
[ "public", "Credential", "setAccessToken", "(", "String", "accessToken", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "this", ".", "accessToken", "=", "accessToken", ";", "}", "finally", "{", "lock", ".", "unlock", "(", ")", ";", "}", "retu...
Sets the access token. <p> Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else. </p> @param accessToken access token or {@code null} for none
[ "Sets", "the", "access", "token", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java#L310-L318
54,630
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java
Credential.setRefreshToken
public Credential setRefreshToken(String refreshToken) { lock.lock(); try { if (refreshToken != null) { Preconditions.checkArgument(jsonFactory != null && transport != null && clientAuthentication != null && tokenServerEncodedUrl != null, "Please use the Builder and call se...
java
public Credential setRefreshToken(String refreshToken) { lock.lock(); try { if (refreshToken != null) { Preconditions.checkArgument(jsonFactory != null && transport != null && clientAuthentication != null && tokenServerEncodedUrl != null, "Please use the Builder and call se...
[ "public", "Credential", "setRefreshToken", "(", "String", "refreshToken", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "if", "(", "refreshToken", "!=", "null", ")", "{", "Preconditions", ".", "checkArgument", "(", "jsonFactory", "!=", "null", ...
Sets the refresh token. <p> Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else. </p> @param refreshToken refresh token or {@code null} for none
[ "Sets", "the", "refresh", "token", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java#L377-L391
54,631
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java
Credential.refreshToken
public final boolean refreshToken() throws IOException { lock.lock(); try { try { TokenResponse tokenResponse = executeRefreshToken(); if (tokenResponse != null) { setFromTokenResponse(tokenResponse); for (CredentialRefreshListener refreshListener : refreshListeners) { ...
java
public final boolean refreshToken() throws IOException { lock.lock(); try { try { TokenResponse tokenResponse = executeRefreshToken(); if (tokenResponse != null) { setFromTokenResponse(tokenResponse); for (CredentialRefreshListener refreshListener : refreshListeners) { ...
[ "public", "final", "boolean", "refreshToken", "(", ")", "throws", "IOException", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "try", "{", "TokenResponse", "tokenResponse", "=", "executeRefreshToken", "(", ")", ";", "if", "(", "tokenResponse", "!=", ...
Request a new access token from the authorization endpoint. <p> On success, it will call {@link #setFromTokenResponse(TokenResponse)}, call {@link CredentialRefreshListener#onTokenResponse} with the token response, and return {@code true}. On error, it will call {@link #setAccessToken(String)} and {@link #setExpiresIn...
[ "Request", "a", "new", "access", "token", "from", "the", "authorization", "endpoint", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java#L490-L522
54,632
googleapis/google-oauth-java-client
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java
Credential.executeRefreshToken
protected TokenResponse executeRefreshToken() throws IOException { if (refreshToken == null) { return null; } return new RefreshTokenRequest(transport, jsonFactory, new GenericUrl(tokenServerEncodedUrl), refreshToken).setClientAuthentication(clientAuthentication) .setRequestInitializer...
java
protected TokenResponse executeRefreshToken() throws IOException { if (refreshToken == null) { return null; } return new RefreshTokenRequest(transport, jsonFactory, new GenericUrl(tokenServerEncodedUrl), refreshToken).setClientAuthentication(clientAuthentication) .setRequestInitializer...
[ "protected", "TokenResponse", "executeRefreshToken", "(", ")", "throws", "IOException", "{", "if", "(", "refreshToken", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "RefreshTokenRequest", "(", "transport", ",", "jsonFactory", ",", "new", ...
Executes a request for new credentials from the token server. <p> The default implementation calls {@link RefreshTokenRequest#execute()} using the {@link #getTransport()}, {@link #getJsonFactory()}, {@link #getRequestInitializer()}, {@link #getTokenServerEncodedUrl()}, {@link #getRefreshToken()}, and the {@link #getCl...
[ "Executes", "a", "request", "for", "new", "credentials", "from", "the", "token", "server", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java#L571-L578
54,633
googleapis/google-oauth-java-client
google-oauth-client-servlet/src/main/java/com/google/api/client/extensions/servlet/auth/AbstractFlowUserServlet.java
AbstractFlowUserServlet.startAuthFlow
private void startAuthFlow( HttpServletResponse resp, PersistenceManager pm, ThreeLeggedFlow oauthFlow) throws IOException { pm.makePersistent(oauthFlow); String authorizationUrl = oauthFlow.getAuthorizationUrl(); resp.sendRedirect(authorizationUrl); }
java
private void startAuthFlow( HttpServletResponse resp, PersistenceManager pm, ThreeLeggedFlow oauthFlow) throws IOException { pm.makePersistent(oauthFlow); String authorizationUrl = oauthFlow.getAuthorizationUrl(); resp.sendRedirect(authorizationUrl); }
[ "private", "void", "startAuthFlow", "(", "HttpServletResponse", "resp", ",", "PersistenceManager", "pm", ",", "ThreeLeggedFlow", "oauthFlow", ")", "throws", "IOException", "{", "pm", ".", "makePersistent", "(", "oauthFlow", ")", ";", "String", "authorizationUrl", "=...
Start the auth flow. Don't run any code after this method that will change the response object.
[ "Start", "the", "auth", "flow", ".", "Don", "t", "run", "any", "code", "after", "this", "method", "that", "will", "change", "the", "response", "object", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client-servlet/src/main/java/com/google/api/client/extensions/servlet/auth/AbstractFlowUserServlet.java#L113-L119
54,634
googleapis/google-oauth-java-client
google-oauth-client-servlet/src/main/java/com/google/api/client/extensions/servlet/auth/AbstractFlowUserServlet.java
AbstractFlowUserServlet.getCredential
protected Credential getCredential(HttpServletRequest req) { Credential cred = (Credential) req.getAttribute(AUTH_CREDENTIAL); return cred; }
java
protected Credential getCredential(HttpServletRequest req) { Credential cred = (Credential) req.getAttribute(AUTH_CREDENTIAL); return cred; }
[ "protected", "Credential", "getCredential", "(", "HttpServletRequest", "req", ")", "{", "Credential", "cred", "=", "(", "Credential", ")", "req", ".", "getAttribute", "(", "AUTH_CREDENTIAL", ")", ";", "return", "cred", ";", "}" ]
Fetch a credential associated with this request. @param req Request object to use as context for fetching the credential. @return Credential object for this request and user. @since 1.5
[ "Fetch", "a", "credential", "associated", "with", "this", "request", "." ]
7a829f8fd4d216c7d5882a82b9b58930fb375592
https://github.com/googleapis/google-oauth-java-client/blob/7a829f8fd4d216c7d5882a82b9b58930fb375592/google-oauth-client-servlet/src/main/java/com/google/api/client/extensions/servlet/auth/AbstractFlowUserServlet.java#L129-L132
54,635
square/tape
tape/src/main/java/com/squareup/tape2/QueueFile.java
QueueFile.ringWrite
private void ringWrite(long position, byte[] buffer, int offset, int count) throws IOException { position = wrapPosition(position); if (position + count <= fileLength) { raf.seek(position); raf.write(buffer, offset, count); } else { // The write overlaps the EOF. // # of bytes to wri...
java
private void ringWrite(long position, byte[] buffer, int offset, int count) throws IOException { position = wrapPosition(position); if (position + count <= fileLength) { raf.seek(position); raf.write(buffer, offset, count); } else { // The write overlaps the EOF. // # of bytes to wri...
[ "private", "void", "ringWrite", "(", "long", "position", ",", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "count", ")", "throws", "IOException", "{", "position", "=", "wrapPosition", "(", "position", ")", ";", "if", "(", "position", "+"...
Writes count bytes from buffer to position in file. Automatically wraps write if position is past the end of the file or if buffer overlaps it. @param position in file to write to @param buffer to write from @param count # of bytes to write
[ "Writes", "count", "bytes", "from", "buffer", "to", "position", "in", "file", ".", "Automatically", "wraps", "write", "if", "position", "is", "past", "the", "end", "of", "the", "file", "or", "if", "buffer", "overlaps", "it", "." ]
445cd3fd0a7b3ec48c9ea3e0e86663fe6d3735d8
https://github.com/square/tape/blob/445cd3fd0a7b3ec48c9ea3e0e86663fe6d3735d8/tape/src/main/java/com/squareup/tape2/QueueFile.java#L308-L322
54,636
square/tape
tape/src/main/java/com/squareup/tape2/QueueFile.java
QueueFile.expandIfNecessary
private void expandIfNecessary(long dataLength) throws IOException { long elementLength = Element.HEADER_LENGTH + dataLength; long remainingBytes = remainingBytes(); if (remainingBytes >= elementLength) return; // Expand. long previousLength = fileLength; long newLength; // Double the lengt...
java
private void expandIfNecessary(long dataLength) throws IOException { long elementLength = Element.HEADER_LENGTH + dataLength; long remainingBytes = remainingBytes(); if (remainingBytes >= elementLength) return; // Expand. long previousLength = fileLength; long newLength; // Double the lengt...
[ "private", "void", "expandIfNecessary", "(", "long", "dataLength", ")", "throws", "IOException", "{", "long", "elementLength", "=", "Element", ".", "HEADER_LENGTH", "+", "dataLength", ";", "long", "remainingBytes", "=", "remainingBytes", "(", ")", ";", "if", "("...
If necessary, expands the file to accommodate an additional element of the given length. @param dataLength length of data being added
[ "If", "necessary", "expands", "the", "file", "to", "accommodate", "an", "additional", "element", "of", "the", "given", "length", "." ]
445cd3fd0a7b3ec48c9ea3e0e86663fe6d3735d8
https://github.com/square/tape/blob/445cd3fd0a7b3ec48c9ea3e0e86663fe6d3735d8/tape/src/main/java/com/squareup/tape2/QueueFile.java#L437-L481
54,637
square/tape
tape/src/main/java/com/squareup/tape2/QueueFile.java
QueueFile.getSneakyThrowable
@SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"}) static <T extends Throwable> T getSneakyThrowable(Throwable t) throws T { throw (T) t; }
java
@SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"}) static <T extends Throwable> T getSneakyThrowable(Throwable t) throws T { throw (T) t; }
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"TypeParameterUnusedInFormals\"", "}", ")", "static", "<", "T", "extends", "Throwable", ">", "T", "getSneakyThrowable", "(", "Throwable", "t", ")", "throws", "T", "{", "throw", "(", "T", ")", "t", ";...
Use this to throw checked exceptions from iterator methods that do not declare that they throw checked exceptions.
[ "Use", "this", "to", "throw", "checked", "exceptions", "from", "iterator", "methods", "that", "do", "not", "declare", "that", "they", "throw", "checked", "exceptions", "." ]
445cd3fd0a7b3ec48c9ea3e0e86663fe6d3735d8
https://github.com/square/tape/blob/445cd3fd0a7b3ec48c9ea3e0e86663fe6d3735d8/tape/src/main/java/com/squareup/tape2/QueueFile.java#L769-L772
54,638
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG3.java
WFG3.t1
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).sLinear(z[i], (float) 0.35); } return result; }
java
public float[] t1(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).sLinear(z[i], (float) 0.35); } return result; }
[ "public", "float", "[", "]", "t1", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "z", ",", "0", ",", "result", ","...
WFG3 t1 transformation
[ "WFG3", "t1", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG3.java#L69-L79
54,639
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG3.java
WFG3.t2
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); int l = z.length - k; for (int i = k + 1; i <= k + l / 2; i++) { int head = k + 2 * (i - k) - 1; int tail = k + 2 * (i - k); float[] subZ = subVector(z, head - 1...
java
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); int l = z.length - k; for (int i = k + 1; i <= k + l / 2; i++) { int head = k + 2 * (i - k) - 1; int tail = k + 2 * (i - k); float[] subZ = subVector(z, head - 1...
[ "public", "float", "[", "]", "t2", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "z", ",", "0", ",", "result", ","...
WFG3 t2 transformation
[ "WFG3", "t2", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG3.java#L85-L99
54,640
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/experiment/Experiment.java
Experiment.removeDuplicatedAlgorithms
public void removeDuplicatedAlgorithms() { List<ExperimentAlgorithm<S, Result>> algorithmList = new ArrayList<>() ; HashSet<String> algorithmTagList = new HashSet<>() ; getAlgorithmList().removeIf(alg -> !algorithmTagList.add(alg.getAlgorithmTag())) ; }
java
public void removeDuplicatedAlgorithms() { List<ExperimentAlgorithm<S, Result>> algorithmList = new ArrayList<>() ; HashSet<String> algorithmTagList = new HashSet<>() ; getAlgorithmList().removeIf(alg -> !algorithmTagList.add(alg.getAlgorithmTag())) ; }
[ "public", "void", "removeDuplicatedAlgorithms", "(", ")", "{", "List", "<", "ExperimentAlgorithm", "<", "S", ",", "Result", ">", ">", "algorithmList", "=", "new", "ArrayList", "<>", "(", ")", ";", "HashSet", "<", "String", ">", "algorithmTagList", "=", "new"...
The list of algorithms contain an algorithm instance per problem. This is not convenient for calculating statistical data, because a same algorithm will appear many times. This method remove duplicated algorithms and leave only an instance of each one.
[ "The", "list", "of", "algorithms", "contain", "an", "algorithm", "instance", "per", "problem", ".", "This", "is", "not", "convenient", "for", "calculating", "statistical", "data", "because", "a", "same", "algorithm", "will", "appear", "many", "times", ".", "Th...
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/Experiment.java#L102-L108
54,641
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/AbstractMOEAD.java
AbstractMOEAD.initializeUniformWeight
protected void initializeUniformWeight() { if ((problem.getNumberOfObjectives() == 2) && (populationSize <= 300)) { for (int n = 0; n < populationSize; n++) { double a = 1.0 * n / (populationSize - 1); lambda[n][0] = a; lambda[n][1] = 1 - a; } } else { String dataFileNa...
java
protected void initializeUniformWeight() { if ((problem.getNumberOfObjectives() == 2) && (populationSize <= 300)) { for (int n = 0; n < populationSize; n++) { double a = 1.0 * n / (populationSize - 1); lambda[n][0] = a; lambda[n][1] = 1 - a; } } else { String dataFileNa...
[ "protected", "void", "initializeUniformWeight", "(", ")", "{", "if", "(", "(", "problem", ".", "getNumberOfObjectives", "(", ")", "==", "2", ")", "&&", "(", "populationSize", "<=", "300", ")", ")", "{", "for", "(", "int", "n", "=", "0", ";", "n", "<"...
Initialize weight vectors
[ "Initialize", "weight", "vectors" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/AbstractMOEAD.java#L97-L141
54,642
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/AbstractMOEAD.java
AbstractMOEAD.updateNeighborhood
@SuppressWarnings("unchecked") protected void updateNeighborhood(S individual, int subProblemId, NeighborType neighborType) throws JMetalException { int size; int time; time = 0; if (neighborType == NeighborType.NEIGHBOR) { size = neighborhood[subProblemId].length; } else { size = p...
java
@SuppressWarnings("unchecked") protected void updateNeighborhood(S individual, int subProblemId, NeighborType neighborType) throws JMetalException { int size; int time; time = 0; if (neighborType == NeighborType.NEIGHBOR) { size = neighborhood[subProblemId].length; } else { size = p...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "updateNeighborhood", "(", "S", "individual", ",", "int", "subProblemId", ",", "NeighborType", "neighborType", ")", "throws", "JMetalException", "{", "int", "size", ";", "int", "time", ";", ...
Update neighborhood method @param individual @param subProblemId @param neighborType @throws JMetalException
[ "Update", "neighborhood", "method" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/AbstractMOEAD.java#L230-L267
54,643
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.initPopulation
public void initPopulation() { for (int i = 0; i < populationSize; i++) { S newSolution = problem.createSolution(); problem.evaluate(newSolution); evaluations++; population.add(newSolution); subregionIdx[i][i] = 1; } }
java
public void initPopulation() { for (int i = 0; i < populationSize; i++) { S newSolution = problem.createSolution(); problem.evaluate(newSolution); evaluations++; population.add(newSolution); subregionIdx[i][i] = 1; } }
[ "public", "void", "initPopulation", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "populationSize", ";", "i", "++", ")", "{", "S", "newSolution", "=", "problem", ".", "createSolution", "(", ")", ";", "problem", ".", "evaluate", "(",...
Initialize the population
[ "Initialize", "the", "population" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L114-L122
54,644
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.sumFitness
public double sumFitness(int location) { double sum = 0; for (int i = 0; i < populationSize; i++) { if (subregionIdx[location][i] == 1) { sum = sum + fitnessFunction(population.get(i), lambda[location]); } } return sum; }
java
public double sumFitness(int location) { double sum = 0; for (int i = 0; i < populationSize; i++) { if (subregionIdx[location][i] == 1) { sum = sum + fitnessFunction(population.get(i), lambda[location]); } } return sum; }
[ "public", "double", "sumFitness", "(", "int", "location", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "populationSize", ";", "i", "++", ")", "{", "if", "(", "subregionIdx", "[", "location", "]", "[", ...
calculate the sum of fitnesses of solutions in the location subregion
[ "calculate", "the", "sum", "of", "fitnesses", "of", "solutions", "in", "the", "location", "subregion" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1108-L1118
54,645
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.deleteCrowdIndiv_same
public void deleteCrowdIndiv_same(int crowdIdx, int nicheCount, double indivFitness, S indiv) { // find the solution indices within this crowdIdx subregion ArrayList<Integer> indList = new ArrayList<>(); for (int i = 0; i < populationSize; i++) { if (subregionIdx[crowdIdx][i] == 1) { indList....
java
public void deleteCrowdIndiv_same(int crowdIdx, int nicheCount, double indivFitness, S indiv) { // find the solution indices within this crowdIdx subregion ArrayList<Integer> indList = new ArrayList<>(); for (int i = 0; i < populationSize; i++) { if (subregionIdx[crowdIdx][i] == 1) { indList....
[ "public", "void", "deleteCrowdIndiv_same", "(", "int", "crowdIdx", ",", "int", "nicheCount", ",", "double", "indivFitness", ",", "S", "indiv", ")", "{", "// find the solution indices within this crowdIdx subregion", "ArrayList", "<", "Integer", ">", "indList", "=", "n...
delete one solution from the most crowded subregion, which is indiv's subregion. Compare indiv's fitness value and the worst one in this subregion
[ "delete", "one", "solution", "from", "the", "most", "crowded", "subregion", "which", "is", "indiv", "s", "subregion", ".", "Compare", "indiv", "s", "fitness", "value", "and", "the", "worst", "one", "in", "this", "subregion" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1124-L1151
54,646
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.deleteCrowdIndiv_diff
public void deleteCrowdIndiv_diff(int crowdIdx, int curLocation, int nicheCount, S indiv) { // find the solution indices within this crowdIdx subregion ArrayList<Integer> indList = new ArrayList<>(); for (int i = 0; i < populationSize; i++) { if (subregionIdx[crowdIdx][i] == 1) { indList.add(...
java
public void deleteCrowdIndiv_diff(int crowdIdx, int curLocation, int nicheCount, S indiv) { // find the solution indices within this crowdIdx subregion ArrayList<Integer> indList = new ArrayList<>(); for (int i = 0; i < populationSize; i++) { if (subregionIdx[crowdIdx][i] == 1) { indList.add(...
[ "public", "void", "deleteCrowdIndiv_diff", "(", "int", "crowdIdx", ",", "int", "curLocation", ",", "int", "nicheCount", ",", "S", "indiv", ")", "{", "// find the solution indices within this crowdIdx subregion", "ArrayList", "<", "Integer", ">", "indList", "=", "new",...
delete one solution from the most crowded subregion, which is different from indiv's subregion. just use indiv to replace the worst solution in that subregion
[ "delete", "one", "solution", "from", "the", "most", "crowded", "subregion", "which", "is", "different", "from", "indiv", "s", "subregion", ".", "just", "use", "indiv", "to", "replace", "the", "worst", "solution", "in", "that", "subregion" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1157-L1184
54,647
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.countOnes
public int countOnes(int location) { int count = 0; for (int i = 0; i < populationSize; i++) { if (subregionIdx[location][i] == 1) { count++; } } return count; }
java
public int countOnes(int location) { int count = 0; for (int i = 0; i < populationSize; i++) { if (subregionIdx[location][i] == 1) { count++; } } return count; }
[ "public", "int", "countOnes", "(", "int", "location", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "populationSize", ";", "i", "++", ")", "{", "if", "(", "subregionIdx", "[", "location", "]", "[", "i",...
Count the number of 1s in the 'location'th subregion
[ "Count", "the", "number", "of", "1s", "in", "the", "location", "th", "subregion" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1189-L1199
54,648
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.countRankOnes
public int countRankOnes(int location) { int count = 0; for (int i = 0; i < populationSize; i++) { if (rankIdx[location][i] == 1) { count++; } } return count; }
java
public int countRankOnes(int location) { int count = 0; for (int i = 0; i < populationSize; i++) { if (rankIdx[location][i] == 1) { count++; } } return count; }
[ "public", "int", "countRankOnes", "(", "int", "location", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "populationSize", ";", "i", "++", ")", "{", "if", "(", "rankIdx", "[", "location", "]", "[", "i", ...
count the number of 1s in a row of rank matrix
[ "count", "the", "number", "of", "1s", "in", "a", "row", "of", "rank", "matrix" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1204-L1214
54,649
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.findPosition
public int findPosition(S indiv) { for (int i = 0; i < populationSize; i++) { if (indiv.equals(population.get(i))) { return i; } } return -1; }
java
public int findPosition(S indiv) { for (int i = 0; i < populationSize; i++) { if (indiv.equals(population.get(i))) { return i; } } return -1; }
[ "public", "int", "findPosition", "(", "S", "indiv", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "populationSize", ";", "i", "++", ")", "{", "if", "(", "indiv", ".", "equals", "(", "population", ".", "get", "(", "i", ")", ")", ")"...
find the index of the solution 'indiv' in the population
[ "find", "the", "index", "of", "the", "solution", "indiv", "in", "the", "population" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1219-L1228
54,650
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.findRegion
public int findRegion(int idx) { for (int i = 0; i < populationSize; i++) { if (subregionIdx[i][idx] == 1) { return i; } } return -1; }
java
public int findRegion(int idx) { for (int i = 0; i < populationSize; i++) { if (subregionIdx[i][idx] == 1) { return i; } } return -1; }
[ "public", "int", "findRegion", "(", "int", "idx", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "populationSize", ";", "i", "++", ")", "{", "if", "(", "subregionIdx", "[", "i", "]", "[", "idx", "]", "==", "1", ")", "{", "return", ...
find the subregion of the 'idx'th solution in the population
[ "find", "the", "subregion", "of", "the", "idx", "th", "solution", "in", "the", "population" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1233-L1242
54,651
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.setLocation
public void setLocation(S indiv, double[] z_, double[] nz_) { int minIdx; double distance, minDist; minIdx = 0; distance = calculateDistance2(indiv, lambda[0], z_, nz_); minDist = distance; for (int i = 1; i < populationSize; i++) { distance = calculateDistance2(indiv, lambda[i], z_, nz_...
java
public void setLocation(S indiv, double[] z_, double[] nz_) { int minIdx; double distance, minDist; minIdx = 0; distance = calculateDistance2(indiv, lambda[0], z_, nz_); minDist = distance; for (int i = 1; i < populationSize; i++) { distance = calculateDistance2(indiv, lambda[i], z_, nz_...
[ "public", "void", "setLocation", "(", "S", "indiv", ",", "double", "[", "]", "z_", ",", "double", "[", "]", "nz_", ")", "{", "int", "minIdx", ";", "double", "distance", ",", "minDist", ";", "minIdx", "=", "0", ";", "distance", "=", "calculateDistance2"...
Set the location of a solution based on the orthogonal distance
[ "Set", "the", "location", "of", "a", "solution", "based", "on", "the", "orthogonal", "distance" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1247-L1267
54,652
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.innerproduct
public double innerproduct(double[] vec1, double[] vec2) { double sum = 0; for (int i = 0; i < vec1.length; i++) { sum += vec1[i] * vec2[i]; } return sum; }
java
public double innerproduct(double[] vec1, double[] vec2) { double sum = 0; for (int i = 0; i < vec1.length; i++) { sum += vec1[i] * vec2[i]; } return sum; }
[ "public", "double", "innerproduct", "(", "double", "[", "]", "vec1", ",", "double", "[", "]", "vec2", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "vec1", ".", "length", ";", "i", "++", ")", "{", ...
Calculate the dot product of two vectors
[ "Calculate", "the", "dot", "product", "of", "two", "vectors" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1364-L1372
54,653
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java
MOEADD.norm_vector
public double norm_vector(double[] z) { double sum = 0; for (int i = 0; i < problem.getNumberOfObjectives(); i++) { sum += z[i] * z[i]; } return Math.sqrt(sum); }
java
public double norm_vector(double[] z) { double sum = 0; for (int i = 0; i < problem.getNumberOfObjectives(); i++) { sum += z[i] * z[i]; } return Math.sqrt(sum); }
[ "public", "double", "norm_vector", "(", "double", "[", "]", "z", ")", "{", "double", "sum", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "problem", ".", "getNumberOfObjectives", "(", ")", ";", "i", "++", ")", "{", "sum", "+=", ...
Calculate the norm of the vector
[ "Calculate", "the", "norm", "of", "the", "vector" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADD.java#L1377-L1385
54,654
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/Epsilon.java
Epsilon.epsilon
private double epsilon(Front front, Front referenceFront) throws JMetalException { double eps, epsJ = 0.0, epsK = 0.0, epsTemp; int numberOfObjectives = front.getPointDimensions() ; eps = Double.MIN_VALUE; for (int i = 0; i < referenceFront.getNumberOfPoints(); i++) { for (int j = 0; j < front...
java
private double epsilon(Front front, Front referenceFront) throws JMetalException { double eps, epsJ = 0.0, epsK = 0.0, epsTemp; int numberOfObjectives = front.getPointDimensions() ; eps = Double.MIN_VALUE; for (int i = 0; i < referenceFront.getNumberOfPoints(); i++) { for (int j = 0; j < front...
[ "private", "double", "epsilon", "(", "Front", "front", ",", "Front", "referenceFront", ")", "throws", "JMetalException", "{", "double", "eps", ",", "epsJ", "=", "0.0", ",", "epsK", "=", "0.0", ",", "epsTemp", ";", "int", "numberOfObjectives", "=", "front", ...
Returns the value of the epsilon indicator. @param front Solution front @param referenceFront Optimal Pareto front @return the value of the epsilon indicator @throws JMetalException
[ "Returns", "the", "value", "of", "the", "epsilon", "indicator", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/Epsilon.java#L78-L110
54,655
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT3.java
ZDT3.evalH
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g) - (f / g) * Math.sin(10.0 * Math.PI * f); return h; }
java
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g) - (f / g) * Math.sin(10.0 * Math.PI * f); return h; }
[ "protected", "double", "evalH", "(", "double", "f", ",", "double", "g", ")", "{", "double", "h", ";", "h", "=", "1.0", "-", "Math", ".", "sqrt", "(", "f", "/", "g", ")", "-", "(", "f", "/", "g", ")", "*", "Math", ".", "sin", "(", "10.0", "*...
Returns the value of the ZDT3 function H. @param f First argument of the function H. @param g Second argument of the function H.
[ "Returns", "the", "value", "of", "the", "ZDT3", "function", "H", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT3.java#L51-L56
54,656
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADSTM.java
MOEADSTM.prefers
public boolean prefers(int x, int y, int[] womanPref, int size) { for (int i = 0; i < size; i++) { int pref = womanPref[i]; if (pref == x) { return true; } if (pref == y) { return false; } } // this should never happen. System.out.println("Error in womanPre...
java
public boolean prefers(int x, int y, int[] womanPref, int size) { for (int i = 0; i < size; i++) { int pref = womanPref[i]; if (pref == x) { return true; } if (pref == y) { return false; } } // this should never happen. System.out.println("Error in womanPre...
[ "public", "boolean", "prefers", "(", "int", "x", ",", "int", "y", ",", "int", "[", "]", "womanPref", ",", "int", "size", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "int", "pref", "=", "womanPr...
Returns true in case that a given woman prefers x to y.
[ "Returns", "true", "in", "case", "that", "a", "given", "woman", "prefers", "x", "to", "y", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/MOEADSTM.java#L300-L314
54,657
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.referenceSetUpdate
@Override public void referenceSetUpdate(DoubleSolution solution) { if (refSet1Test(solution)) { for (DoubleSolution solutionInRefSet2 : referenceSet2) { double aux = SolutionUtils.distanceBetweenSolutionsInObjectiveSpace(solution, solutionInRefSet2); DoubleSolution auxSolution = solutionInRef...
java
@Override public void referenceSetUpdate(DoubleSolution solution) { if (refSet1Test(solution)) { for (DoubleSolution solutionInRefSet2 : referenceSet2) { double aux = SolutionUtils.distanceBetweenSolutionsInObjectiveSpace(solution, solutionInRefSet2); DoubleSolution auxSolution = solutionInRef...
[ "@", "Override", "public", "void", "referenceSetUpdate", "(", "DoubleSolution", "solution", ")", "{", "if", "(", "refSet1Test", "(", "solution", ")", ")", "{", "for", "(", "DoubleSolution", "solutionInRefSet2", ":", "referenceSet2", ")", "{", "double", "aux", ...
Update the reference set with a new solution @param solution
[ "Update", "the", "reference", "set", "with", "a", "new", "solution" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L182-L194
54,658
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.buildNewReferenceSet1
public void buildNewReferenceSet1() { DoubleSolution individual; strengthRawFitness.computeDensityEstimator(getPopulation()); Collections.sort(getPopulation(), fitnessComparator); for (int i = 0; i < referenceSet1Size; i++) { individual = getPopulation().get(0); getPopulation().remove(0); ...
java
public void buildNewReferenceSet1() { DoubleSolution individual; strengthRawFitness.computeDensityEstimator(getPopulation()); Collections.sort(getPopulation(), fitnessComparator); for (int i = 0; i < referenceSet1Size; i++) { individual = getPopulation().get(0); getPopulation().remove(0); ...
[ "public", "void", "buildNewReferenceSet1", "(", ")", "{", "DoubleSolution", "individual", ";", "strengthRawFitness", ".", "computeDensityEstimator", "(", "getPopulation", "(", ")", ")", ";", "Collections", ".", "sort", "(", "getPopulation", "(", ")", ",", "fitness...
Build the referenceSet1 by moving the best referenceSet1Size individuals, according to a fitness comparator, from the population to the referenceSet1
[ "Build", "the", "referenceSet1", "by", "moving", "the", "best", "referenceSet1Size", "individuals", "according", "to", "a", "fitness", "comparator", "from", "the", "population", "to", "the", "referenceSet1" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L200-L211
54,659
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.buildNewReferenceSet2
public void buildNewReferenceSet2() { for (int i = 0; i < getPopulation().size(); i++) { DoubleSolution individual = getPopulation().get(i); double distanceAux = SolutionUtils .distanceToSolutionListInSolutionSpace(individual, referenceSet1); distanceToSolutionListAttribute.setAttribute(...
java
public void buildNewReferenceSet2() { for (int i = 0; i < getPopulation().size(); i++) { DoubleSolution individual = getPopulation().get(i); double distanceAux = SolutionUtils .distanceToSolutionListInSolutionSpace(individual, referenceSet1); distanceToSolutionListAttribute.setAttribute(...
[ "public", "void", "buildNewReferenceSet2", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getPopulation", "(", ")", ".", "size", "(", ")", ";", "i", "++", ")", "{", "DoubleSolution", "individual", "=", "getPopulation", "(", ")", "."...
Build the referenceSet2 by moving to it the most diverse referenceSet2Size individuals from the population in respect to the referenceSet1. The size of the referenceSet2 can be lower than referenceSet2Size depending on the current size of the population
[ "Build", "the", "referenceSet2", "by", "moving", "to", "it", "the", "most", "diverse", "referenceSet2Size", "individuals", "from", "the", "population", "in", "respect", "to", "the", "referenceSet1", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L220-L275
54,660
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.subsetGeneration
@Override public List<List<DoubleSolution>> subsetGeneration() { List<List<DoubleSolution>> solutionGroupsList ; solutionGroupsList = generatePairsFromSolutionList(referenceSet1) ; solutionGroupsList.addAll(generatePairsFromSolutionList(referenceSet2)); return solutionGroupsList ; }
java
@Override public List<List<DoubleSolution>> subsetGeneration() { List<List<DoubleSolution>> solutionGroupsList ; solutionGroupsList = generatePairsFromSolutionList(referenceSet1) ; solutionGroupsList.addAll(generatePairsFromSolutionList(referenceSet2)); return solutionGroupsList ; }
[ "@", "Override", "public", "List", "<", "List", "<", "DoubleSolution", ">", ">", "subsetGeneration", "(", ")", "{", "List", "<", "List", "<", "DoubleSolution", ">>", "solutionGroupsList", ";", "solutionGroupsList", "=", "generatePairsFromSolutionList", "(", "refer...
Subset generation method @return
[ "Subset", "generation", "method" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L379-L388
54,661
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java
ABYSS.generatePairsFromSolutionList
public List<List<DoubleSolution>> generatePairsFromSolutionList(List<DoubleSolution> solutionList) { List<List<DoubleSolution>> subset = new ArrayList<>() ; for (int i = 0; i < solutionList.size(); i++) { DoubleSolution solution1 = solutionList.get(i); for (int j = i + 1; j < solutionList.size(); j+...
java
public List<List<DoubleSolution>> generatePairsFromSolutionList(List<DoubleSolution> solutionList) { List<List<DoubleSolution>> subset = new ArrayList<>() ; for (int i = 0; i < solutionList.size(); i++) { DoubleSolution solution1 = solutionList.get(i); for (int j = i + 1; j < solutionList.size(); j+...
[ "public", "List", "<", "List", "<", "DoubleSolution", ">", ">", "generatePairsFromSolutionList", "(", "List", "<", "DoubleSolution", ">", "solutionList", ")", "{", "List", "<", "List", "<", "DoubleSolution", ">>", "subset", "=", "new", "ArrayList", "<>", "(", ...
Generate all pair combinations of the referenceSet1
[ "Generate", "all", "pair", "combinations", "of", "the", "referenceSet1" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/abyss/ABYSS.java#L393-L414
54,662
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java
ComputeQualityIndicators.resetIndicatorFiles
private void resetIndicatorFiles() { for (GenericIndicator<S> indicator : experiment.getIndicatorList()) { for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) { for (ExperimentProblem<?> problem: experiment.getProblemList()) { String algorithmDirectory; a...
java
private void resetIndicatorFiles() { for (GenericIndicator<S> indicator : experiment.getIndicatorList()) { for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) { for (ExperimentProblem<?> problem: experiment.getProblemList()) { String algorithmDirectory; a...
[ "private", "void", "resetIndicatorFiles", "(", ")", "{", "for", "(", "GenericIndicator", "<", "S", ">", "indicator", ":", "experiment", ".", "getIndicatorList", "(", ")", ")", "{", "for", "(", "ExperimentAlgorithm", "<", "?", ",", "Result", ">", "algorithm",...
Deletes the files containing the indicator values if the exist.
[ "Deletes", "the", "files", "containing", "the", "indicator", "values", "if", "the", "exist", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java#L189-L202
54,663
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java
ComputeQualityIndicators.resetFile
private void resetFile(String file) { File f = new File(file); if (f.exists()) { JMetalLogger.logger.info("Already existing file " + file); if (f.isDirectory()) { JMetalLogger.logger.info("Deleting directory " + file); if (f.delete()) { JMetalLogger.logger.info("Directory ...
java
private void resetFile(String file) { File f = new File(file); if (f.exists()) { JMetalLogger.logger.info("Already existing file " + file); if (f.isDirectory()) { JMetalLogger.logger.info("Deleting directory " + file); if (f.delete()) { JMetalLogger.logger.info("Directory ...
[ "private", "void", "resetFile", "(", "String", "file", ")", "{", "File", "f", "=", "new", "File", "(", "file", ")", ";", "if", "(", "f", ".", "exists", "(", ")", ")", "{", "JMetalLogger", ".", "logger", ".", "info", "(", "\"Already existing file \"", ...
Deletes a file or directory if it does exist @param file
[ "Deletes", "a", "file", "or", "directory", "if", "it", "does", "exist" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ComputeQualityIndicators.java#L209-L232
54,664
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java
MaF09.lines_of_polygon
public double[][] lines_of_polygon(double[][] p) { double[][] c9 = new double[p.length][3]; for (int i = 0; i < p.length - 1; i++) {// evaluate formula of the straight line l1,...,m-1 c9[i] = line_of_twoP(p[i], p[i + 1]); } // evaluate formula of the straight line lm c9[p.length - 1] = ...
java
public double[][] lines_of_polygon(double[][] p) { double[][] c9 = new double[p.length][3]; for (int i = 0; i < p.length - 1; i++) {// evaluate formula of the straight line l1,...,m-1 c9[i] = line_of_twoP(p[i], p[i + 1]); } // evaluate formula of the straight line lm c9[p.length - 1] = ...
[ "public", "double", "[", "]", "[", "]", "lines_of_polygon", "(", "double", "[", "]", "[", "]", "p", ")", "{", "double", "[", "]", "[", "]", "c9", "=", "new", "double", "[", "p", ".", "length", "]", "[", "3", "]", ";", "for", "(", "int", "i", ...
given vertexes,evaluate the straight lines of a polygon
[ "given", "vertexes", "evaluate", "the", "straight", "lines", "of", "a", "polygon" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java#L224-L232
54,665
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java
MaF09.generV
public static double generV(double lb, double ub) { double p; p = JMetalRandom.getInstance().nextDouble() * (ub - lb) + lb; return p; }
java
public static double generV(double lb, double ub) { double p; p = JMetalRandom.getInstance().nextDouble() * (ub - lb) + lb; return p; }
[ "public", "static", "double", "generV", "(", "double", "lb", ",", "double", "ub", ")", "{", "double", "p", ";", "p", "=", "JMetalRandom", ".", "getInstance", "(", ")", ".", "nextDouble", "(", ")", "*", "(", "ub", "-", "lb", ")", "+", "lb", ";", "...
generate a random variable with boundary lb,ub
[ "generate", "a", "random", "variable", "with", "boundary", "lb", "ub" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/maf/MaF09.java#L324-L328
54,666
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/UniformMutation.java
UniformMutation.doMutation
public void doMutation(double probability, DoubleSolution solution) { for (int i = 0; i < solution.getNumberOfVariables(); i++) { if (randomGenenerator.getRandomValue() < probability) { double rand = randomGenenerator.getRandomValue(); double tmp = (rand - 0.5) * perturbation; tmp +=...
java
public void doMutation(double probability, DoubleSolution solution) { for (int i = 0; i < solution.getNumberOfVariables(); i++) { if (randomGenenerator.getRandomValue() < probability) { double rand = randomGenenerator.getRandomValue(); double tmp = (rand - 0.5) * perturbation; tmp +=...
[ "public", "void", "doMutation", "(", "double", "probability", ",", "DoubleSolution", "solution", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "if", "(", "randomG...
Perform the operation @param probability Mutation setProbability @param solution The solution to mutate
[ "Perform", "the", "operation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/operator/impl/mutation/UniformMutation.java#L57-L74
54,667
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/mop/MOP6.java
MOP6.evalG
private double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 2; i < solution.getNumberOfVariables(); i++) { double t = solution.getVariableValue(i) - solution.getVariableValue(0) * solution.getVariableValue(1); g += -0.9 * t * t + Math.pow(Math.abs(t), 0.6); } g = 2 * Math.si...
java
private double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 2; i < solution.getNumberOfVariables(); i++) { double t = solution.getVariableValue(i) - solution.getVariableValue(0) * solution.getVariableValue(1); g += -0.9 * t * t + Math.pow(Math.abs(t), 0.6); } g = 2 * Math.si...
[ "private", "double", "evalG", "(", "DoubleSolution", "solution", ")", "{", "double", "g", "=", "0.0", ";", "for", "(", "int", "i", "=", "2", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "double", "t", ...
Returns the value of the MOP6 function G. @param solution Solution
[ "Returns", "the", "value", "of", "the", "MOP6", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/mop/MOP6.java#L67-L75
54,668
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java
MOMBI2History.add
public void add(List<Double> maxs) { List<Double> aux = new ArrayList<>(this.numberOfObjectives); aux.addAll(maxs); this.history.add(aux); if (history.size() > MAX_LENGHT) history.remove(0); }
java
public void add(List<Double> maxs) { List<Double> aux = new ArrayList<>(this.numberOfObjectives); aux.addAll(maxs); this.history.add(aux); if (history.size() > MAX_LENGHT) history.remove(0); }
[ "public", "void", "add", "(", "List", "<", "Double", ">", "maxs", ")", "{", "List", "<", "Double", ">", "aux", "=", "new", "ArrayList", "<>", "(", "this", ".", "numberOfObjectives", ")", ";", "aux", ".", "addAll", "(", "maxs", ")", ";", "this", "."...
Adds a new vector of maxs values to the history. The method ensures that only the newest MAX_LENGTH vectors will be kept in the history @param maxs
[ "Adds", "a", "new", "vector", "of", "maxs", "values", "to", "the", "history", ".", "The", "method", "ensures", "that", "only", "the", "newest", "MAX_LENGTH", "vectors", "will", "be", "kept", "in", "the", "history" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java#L34-L40
54,669
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java
MOMBI2History.mean
public List<Double> mean() { List<Double> result = new ArrayList<>(this.numberOfObjectives); for (int i = 0; i < this.numberOfObjectives; i++) result.add(0.0); for (List<Double> historyMember : this.history) for (int i = 0; i < this.numberOfObjectives;i++) result.set(i, result.get(i) + ...
java
public List<Double> mean() { List<Double> result = new ArrayList<>(this.numberOfObjectives); for (int i = 0; i < this.numberOfObjectives; i++) result.add(0.0); for (List<Double> historyMember : this.history) for (int i = 0; i < this.numberOfObjectives;i++) result.set(i, result.get(i) + ...
[ "public", "List", "<", "Double", ">", "mean", "(", ")", "{", "List", "<", "Double", ">", "result", "=", "new", "ArrayList", "<>", "(", "this", ".", "numberOfObjectives", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "num...
Returns the mean of the values contained in the history
[ "Returns", "the", "mean", "of", "the", "values", "contained", "in", "the", "history" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/mombi/util/MOMBI2History.java#L45-L59
54,670
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.setScalarizationValue
private static <S extends Solution<?>> void setScalarizationValue(S solution, double scalarizationValue) { solution.setAttribute(new ScalarizationValue<S>().getAttributeIdentifier(), scalarizationValue); }
java
private static <S extends Solution<?>> void setScalarizationValue(S solution, double scalarizationValue) { solution.setAttribute(new ScalarizationValue<S>().getAttributeIdentifier(), scalarizationValue); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "setScalarizationValue", "(", "S", "solution", ",", "double", "scalarizationValue", ")", "{", "solution", ".", "setAttribute", "(", "new", "ScalarizationValue", "<", "S", ">", ...
Sets the scalarization value of a solution. Used for for simplified static access. @param solution The solution whose scalarization value is set. @param scalarizationValue The scalarization value of the solution.
[ "Sets", "the", "scalarization", "value", "of", "a", "solution", ".", "Used", "for", "for", "simplified", "static", "access", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L30-L32
54,671
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.toArray
private static double[] toArray(List<Double> list) { double[] values = new double[list.size()]; for (int i = 0; i < values.length; i++) { values[i] = list.get(i); } return values; }
java
private static double[] toArray(List<Double> list) { double[] values = new double[list.size()]; for (int i = 0; i < values.length; i++) { values[i] = list.get(i); } return values; }
[ "private", "static", "double", "[", "]", "toArray", "(", "List", "<", "Double", ">", "list", ")", "{", "double", "[", "]", "values", "=", "new", "double", "[", "list", ".", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i",...
Method for turning a list of doubles to an array. @param list List of doubles @return Array of doubles.
[ "Method", "for", "turning", "a", "list", "of", "doubles", "to", "an", "array", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L51-L57
54,672
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.getIdealValues
private static <S extends Solution<?>> double[] getIdealValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findLowestValues(front); return toArray(list); }
java
private static <S extends Solution<?>> double[] getIdealValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findLowestValues(front); return toArray(list); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "getIdealValues", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "ArrayFront", "front", "=", "new", "ArrayFront", "(", "solutionsList", ")", ";", "Front...
Computes the ideal point based on a list of solutions @param solutionsList A list of solutions @return The ideal point
[ "Computes", "the", "ideal", "point", "based", "on", "a", "list", "of", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L65-L70
54,673
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.getNadirValues
private static <S extends Solution<?>> double[] getNadirValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findHighestValues(front); return toArray(list); }
java
private static <S extends Solution<?>> double[] getNadirValues(List<S> solutionsList) { ArrayFront front = new ArrayFront(solutionsList); FrontExtremeValues extremeValues = new FrontExtremeValues(); List<Double> list = extremeValues.findHighestValues(front); return toArray(list); }
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "getNadirValues", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "ArrayFront", "front", "=", "new", "ArrayFront", "(", "solutionsList", ")", ";", "Front...
Computes the nadir point based on a list of solutions @param solutionsList A list of solutions @return The nadir point.
[ "Computes", "the", "nadir", "point", "based", "on", "a", "list", "of", "solutions" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L78-L83
54,674
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.getExtremePoints
private static <S extends Solution<?>> double[][] getExtremePoints(List<S> solutionsList) { // One extreme point for each objective double[][] extremePoints = new double[solutionsList.get(0).getNumberOfObjectives()][]; for (int i = 0; i < extremePoints.length; i++) { S extreme = Collections.min(...
java
private static <S extends Solution<?>> double[][] getExtremePoints(List<S> solutionsList) { // One extreme point for each objective double[][] extremePoints = new double[solutionsList.get(0).getNumberOfObjectives()][]; for (int i = 0; i < extremePoints.length; i++) { S extreme = Collections.min(...
[ "private", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "double", "[", "]", "[", "]", "getExtremePoints", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "// One extreme point for each objective\r", "double", "[", "]", "[", "]", "e...
Computes the extreme points on achievement scalarization values @param solutionsList A list of solutions. @return Extreme points of the list of solutions.
[ "Computes", "the", "extreme", "points", "on", "achievement", "scalarization", "values" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L91-L104
54,675
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.sumOfObjectives
public static <S extends Solution<?>> void sumOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double sum = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += solution.getObjective(i); } setScalarizationValue(so...
java
public static <S extends Solution<?>> void sumOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double sum = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += solution.getObjective(i); } setScalarizationValue(so...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "sumOfObjectives", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "double", "sum", "=", "solution", "....
Scalarization values is computed by summing objective values. @param solutionsList A list of solutions.
[ "Scalarization", "values", "is", "computed", "by", "summing", "objective", "values", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L111-L119
54,676
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedSum
public static <S extends Solution<?>> void weightedSum(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double sum = weights[0] * solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += weights[i] * solution.getObjective(i); ...
java
public static <S extends Solution<?>> void weightedSum(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double sum = weights[0] * solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { sum += weights[i] * solution.getObjective(i); ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedSum", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "d...
Objective values are multiplied by weights and summed. Weights should always be positive. @param solutionsList A list of solutions. @param weights Positive constants by which objectives are summed.
[ "Objective", "values", "are", "multiplied", "by", "weights", "and", "summed", ".", "Weights", "should", "always", "be", "positive", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L128-L137
54,677
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.productOfObjectives
public static <S extends Solution<?>> void productOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double product = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= solution.getObjective(i); } setScalariza...
java
public static <S extends Solution<?>> void productOfObjectives(List<S> solutionsList) { for (S solution : solutionsList) { double product = solution.getObjective(0); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= solution.getObjective(i); } setScalariza...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "productOfObjectives", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "double", "product", "=", "solutio...
Objective values are multiplied. @param solutionsList A list of solutions.
[ "Objective", "values", "are", "multiplied", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L144-L152
54,678
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedProduct
public static <S extends Solution<?>> void weightedProduct(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double product = Math.pow(solution.getObjective(0), weights[0]); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= Math.pow(solution....
java
public static <S extends Solution<?>> void weightedProduct(List<S> solutionsList, double[] weights) { for (S solution : solutionsList) { double product = Math.pow(solution.getObjective(0), weights[0]); for (int i = 1; i < solution.getNumberOfObjectives(); i++) { product *= Math.pow(solution....
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedProduct", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", ...
Objectives are exponentiated by a positive weight and afterwards multiplied. @param solutionsList A list of solutions. @param weights Weights by objectives are exponentiated
[ "Objectives", "are", "exponentiated", "by", "a", "positive", "weight", "and", "afterwards", "multiplied", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L161-L169
54,679
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.chebyshev
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList) { chebyshev(solutionsList, getIdealValues(solutionsList)); }
java
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList) { chebyshev(solutionsList, getIdealValues(solutionsList)); }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "chebyshev", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "chebyshev", "(", "solutionsList", ",", "getIdealValues", "(", "solutionsList", ")", ")", ";", "}" ]
Scalarization values based on the Chebyshev function. The ideal point is computed from the list of solutions. @param solutionsList A list of solutions.
[ "Scalarization", "values", "based", "on", "the", "Chebyshev", "function", ".", "The", "ideal", "point", "is", "computed", "from", "the", "list", "of", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L177-L179
54,680
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.weightedChebyshev
public static <S extends Solution<?>> void weightedChebyshev(List<S> solutionsList, double[] weights) { weightedChebyshev(solutionsList, getIdealValues(solutionsList), weights); }
java
public static <S extends Solution<?>> void weightedChebyshev(List<S> solutionsList, double[] weights) { weightedChebyshev(solutionsList, getIdealValues(solutionsList), weights); }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "weightedChebyshev", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "weights", ")", "{", "weightedChebyshev", "(", "solutionsList", ",", "getIdealValues",...
Chebyhsev function with weighted objectives. @param solutionsList A list of solutions. @param weights Constants by which ideal values and objective values are multiplied.
[ "Chebyhsev", "function", "with", "weighted", "objectives", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L188-L190
54,681
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.chebyshev
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList, double[] idealValues) { for (S solution : solutionsList) { double max = solution.getObjective(0) - idealValues[0]; for (int i = 1; i < solution.getNumberOfObjectives(); i++) { max = Math.max(max, solution.getObjectiv...
java
public static <S extends Solution<?>> void chebyshev(List<S> solutionsList, double[] idealValues) { for (S solution : solutionsList) { double max = solution.getObjective(0) - idealValues[0]; for (int i = 1; i < solution.getNumberOfObjectives(); i++) { max = Math.max(max, solution.getObjectiv...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "chebyshev", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "idealValues", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", ...
Scalarization values based on the Chebyshev function. @param solutionsList A list of solutions. @param idealValues The ideal point
[ "Scalarization", "values", "based", "on", "the", "Chebyshev", "function", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L198-L206
54,682
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.nash
public static <S extends Solution<?>> void nash(List<S> solutionsList) { nash(solutionsList, getNadirValues(solutionsList)); }
java
public static <S extends Solution<?>> void nash(List<S> solutionsList) { nash(solutionsList, getNadirValues(solutionsList)); }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "nash", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "nash", "(", "solutionsList", ",", "getNadirValues", "(", "solutionsList", ")", ")", ";", "}" ]
Scalarization values based on the Nash bargaining solution. The disagreement point is computed based on the list of solutions. @param solutionsList A list of solutions.
[ "Scalarization", "values", "based", "on", "the", "Nash", "bargaining", "solution", ".", "The", "disagreement", "point", "is", "computed", "based", "on", "the", "list", "of", "solutions", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L232-L234
54,683
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.nash
public static <S extends Solution<?>> void nash(List<S> solutionsList, double[] nadirValues) { for (S solution : solutionsList) { double nash = nadirValues[0] - solution.getObjective(0); for (int i = 1; i < nadirValues.length; i++) { nash *= (nadirValues[i] - solution.getObjective(i)); ...
java
public static <S extends Solution<?>> void nash(List<S> solutionsList, double[] nadirValues) { for (S solution : solutionsList) { double nash = nadirValues[0] - solution.getObjective(0); for (int i = 1; i < nadirValues.length; i++) { nash *= (nadirValues[i] - solution.getObjective(i)); ...
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "nash", "(", "List", "<", "S", ">", "solutionsList", ",", "double", "[", "]", "nadirValues", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "doub...
Scalarization values based on the Nash bargaining solution. @param solutionsList A list of solutions. @param nadirValues The disagreement point.
[ "Scalarization", "values", "based", "on", "the", "Nash", "bargaining", "solution", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L242-L252
54,684
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java
ScalarizationUtils.uniform
public static <S extends Solution<?>> void uniform(List<S> solutionsList) { for (S solution : solutionsList) { setScalarizationValue(solution, 1.0); } }
java
public static <S extends Solution<?>> void uniform(List<S> solutionsList) { for (S solution : solutionsList) { setScalarizationValue(solution, 1.0); } }
[ "public", "static", "<", "S", "extends", "Solution", "<", "?", ">", ">", "void", "uniform", "(", "List", "<", "S", ">", "solutionsList", ")", "{", "for", "(", "S", "solution", ":", "solutionsList", ")", "{", "setScalarizationValue", "(", "solution", ",",...
Uniform preferences. Each solution is assigned a scalarization value of 1.0. @param solutionsList A list of solutions.
[ "Uniform", "preferences", ".", "Each", "solution", "is", "assigned", "a", "scalarization", "value", "of", "1", ".", "0", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/espea/util/ScalarizationUtils.java#L337-L341
54,685
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java
WFG1.t2
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).bFlat(z[i], (float) 0.8, (float) 0.75, (float) 0.85); } return result; }
java
public float[] t2(float[] z, int k) { float[] result = new float[z.length]; System.arraycopy(z, 0, result, 0, k); for (int i = k; i < z.length; i++) { result[i] = (new Transformations()).bFlat(z[i], (float) 0.8, (float) 0.75, (float) 0.85); } return result; }
[ "public", "float", "[", "]", "t2", "(", "float", "[", "]", "z", ",", "int", "k", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "System", ".", "arraycopy", "(", "z", ",", "0", ",", "result", ","...
WFG1 t2 transformation
[ "WFG1", "t2", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java#L96-L106
54,686
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java
WFG1.t3
public float[] t3(float[] z) throws JMetalException { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).bPoly(z[i], (float) 0.02); } return result; }
java
public float[] t3(float[] z) throws JMetalException { float[] result = new float[z.length]; for (int i = 0; i < z.length; i++) { result[i] = (new Transformations()).bPoly(z[i], (float) 0.02); } return result; }
[ "public", "float", "[", "]", "t3", "(", "float", "[", "]", "z", ")", "throws", "JMetalException", "{", "float", "[", "]", "result", "=", "new", "float", "[", "z", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "z", ...
WFG1 t3 transformation @throws org.uma.jmetal.util.JMetalException
[ "WFG1", "t3", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java#L113-L121
54,687
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java
WFG1.t4
public float[] t4(float[] z, int k, int M) { float[] result = new float[M]; float[] w = new float[z.length]; for (int i = 0; i < z.length; i++) { w[i] = (float) 2.0 * (i + 1); } for (int i = 1; i <= M - 1; i++) { int head = (i - 1) * k / (M - 1) + 1; int tail = i * k / ...
java
public float[] t4(float[] z, int k, int M) { float[] result = new float[M]; float[] w = new float[z.length]; for (int i = 0; i < z.length; i++) { w[i] = (float) 2.0 * (i + 1); } for (int i = 1; i <= M - 1; i++) { int head = (i - 1) * k / (M - 1) + 1; int tail = i * k / ...
[ "public", "float", "[", "]", "t4", "(", "float", "[", "]", "z", ",", "int", "k", ",", "int", "M", ")", "{", "float", "[", "]", "result", "=", "new", "float", "[", "M", "]", ";", "float", "[", "]", "w", "=", "new", "float", "[", "z", ".", ...
WFG1 t4 transformation
[ "WFG1", "t4", "transformation" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/WFG1.java#L126-L150
54,688
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.validate
public static boolean validate (double[][] weights, int numberOfComponents) { int i; boolean correct; correct = (weights != null && weights.length > 0); i = 0; while (correct && i < weights.length) { correct = (weights[i].length == numberOfComponents); i++; } return correct; }
java
public static boolean validate (double[][] weights, int numberOfComponents) { int i; boolean correct; correct = (weights != null && weights.length > 0); i = 0; while (correct && i < weights.length) { correct = (weights[i].length == numberOfComponents); i++; } return correct; }
[ "public", "static", "boolean", "validate", "(", "double", "[", "]", "[", "]", "weights", ",", "int", "numberOfComponents", ")", "{", "int", "i", ";", "boolean", "correct", ";", "correct", "=", "(", "weights", "!=", "null", "&&", "weights", ".", "length",...
Validate if the number of components of all weight vectors has the expected dimensionality. @param weights Weight vectors to validate @param numberOfComponents Number of components each weight vector must have @return True if the weight vectors are correct, False if the weight vectors are incorrect
[ "Validate", "if", "the", "number", "of", "components", "of", "all", "weight", "vectors", "has", "the", "expected", "dimensionality", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L24-L37
54,689
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.initializeUniformlyInTwoDimensions
public static double[][] initializeUniformlyInTwoDimensions(double epsilon, int numberOfWeights) { double[][] weights = new double[numberOfWeights][2]; int indexOfWeight; double w, jump; jump = (1 - (2 * epsilon)) / (numberOfWeights - 1); indexOfWeight = 0; w = epsilon; //while(w <= (1-epsilon...
java
public static double[][] initializeUniformlyInTwoDimensions(double epsilon, int numberOfWeights) { double[][] weights = new double[numberOfWeights][2]; int indexOfWeight; double w, jump; jump = (1 - (2 * epsilon)) / (numberOfWeights - 1); indexOfWeight = 0; w = epsilon; //while(w <= (1-epsilon...
[ "public", "static", "double", "[", "]", "[", "]", "initializeUniformlyInTwoDimensions", "(", "double", "epsilon", ",", "int", "numberOfWeights", ")", "{", "double", "[", "]", "[", "]", "weights", "=", "new", "double", "[", "numberOfWeights", "]", "[", "2", ...
Generate uniform weight vectors in two dimension @param epsilon Distance between each component of the weight vector @param numberOfWeights Number of weight vectors to generate @return A set of weight vectors
[ "Generate", "uniform", "weight", "vectors", "in", "two", "dimension" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L46-L68
54,690
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.readFromResourcesInJMetal
public static double[][] readFromResourcesInJMetal(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { InputStream in = WeightVectors.class.getResourceAsStream("/" + filePath); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedR...
java
public static double[][] readFromResourcesInJMetal(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { InputStream in = WeightVectors.class.getResourceAsStream("/" + filePath); InputStreamReader isr = new InputStreamReader(in); BufferedReader br = new BufferedR...
[ "public", "static", "double", "[", "]", "[", "]", "readFromResourcesInJMetal", "(", "String", "filePath", ")", "{", "double", "[", "]", "[", "]", "weights", ";", "Vector", "<", "double", "[", "]", ">", "listOfWeights", "=", "new", "Vector", "<>", "(", ...
Read a set of weight vector from a file in the resources folder in jMetal @param filePath The name of file in the resources folder of jMetal @return A set of weight vectors
[ "Read", "a", "set", "of", "weight", "vector", "from", "a", "file", "in", "the", "resources", "folder", "in", "jMetal" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L76-L114
54,691
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.readFromFile
public static double[][] readFromFile(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { // Open the file FileInputStream fis = new FileInputStream(filePath); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr...
java
public static double[][] readFromFile(String filePath) { double[][] weights; Vector<double[]> listOfWeights = new Vector<>(); try { // Open the file FileInputStream fis = new FileInputStream(filePath); InputStreamReader isr = new InputStreamReader(fis); BufferedReader br = new BufferedReader(isr...
[ "public", "static", "double", "[", "]", "[", "]", "readFromFile", "(", "String", "filePath", ")", "{", "double", "[", "]", "[", "]", "weights", ";", "Vector", "<", "double", "[", "]", ">", "listOfWeights", "=", "new", "Vector", "<>", "(", ")", ";", ...
Read a set of weight vector from a file @param filePath A file containing the weight vectors @return A set of weight vectors
[ "Read", "a", "set", "of", "weight", "vector", "from", "a", "file" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L122-L161
54,692
jMetal/jMetal
jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java
WeightVectors.invert
public static double[][] invert(double[][] weights, boolean normalize) { double[][] result = new double[weights.length][weights[0].length]; for (int indexOfWeight = 0; indexOfWeight < weights.length; indexOfWeight++) { if (normalize) { double sum = 0; for (int indexOfComponent = 0; indexOfCompone...
java
public static double[][] invert(double[][] weights, boolean normalize) { double[][] result = new double[weights.length][weights[0].length]; for (int indexOfWeight = 0; indexOfWeight < weights.length; indexOfWeight++) { if (normalize) { double sum = 0; for (int indexOfComponent = 0; indexOfCompone...
[ "public", "static", "double", "[", "]", "[", "]", "invert", "(", "double", "[", "]", "[", "]", "weights", ",", "boolean", "normalize", ")", "{", "double", "[", "]", "[", "]", "result", "=", "new", "double", "[", "weights", ".", "length", "]", "[", ...
Calculate the inverse of a set of weight vectors @param weights A set of weight vectors @param normalize True if the weights should be normalize by the sum of the components @return A set of weight vectors
[ "Calculate", "the", "inverse", "of", "a", "set", "of", "weight", "vectors" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/wasfga/util/WeightVectors.java#L170-L191
54,693
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java
ZDT1.evalG
protected double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 1; i < solution.getNumberOfVariables(); i++) { g += solution.getVariableValue(i); } double constant = 9.0 / (solution.getNumberOfVariables() - 1); return constant * g + 1.0; }
java
protected double evalG(DoubleSolution solution) { double g = 0.0; for (int i = 1; i < solution.getNumberOfVariables(); i++) { g += solution.getVariableValue(i); } double constant = 9.0 / (solution.getNumberOfVariables() - 1); return constant * g + 1.0; }
[ "protected", "double", "evalG", "(", "DoubleSolution", "solution", ")", "{", "double", "g", "=", "0.0", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "solution", ".", "getNumberOfVariables", "(", ")", ";", "i", "++", ")", "{", "g", "+=", "s...
Returns the value of the ZDT1 function G. @param solution Solution
[ "Returns", "the", "value", "of", "the", "ZDT1", "function", "G", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java#L79-L87
54,694
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java
ZDT1.evalH
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g); return h; }
java
protected double evalH(double f, double g) { double h ; h = 1.0 - Math.sqrt(f / g); return h; }
[ "protected", "double", "evalH", "(", "double", "f", ",", "double", "g", ")", "{", "double", "h", ";", "h", "=", "1.0", "-", "Math", ".", "sqrt", "(", "f", "/", "g", ")", ";", "return", "h", ";", "}" ]
Returns the value of the ZDT1 function H. @param f First argument of the function H. @param g Second argument of the function H.
[ "Returns", "the", "value", "of", "the", "ZDT1", "function", "H", "." ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/zdt/ZDT1.java#L95-L99
54,695
jMetal/jMetal
jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/GenerationalDistance.java
GenerationalDistance.generationalDistance
public double generationalDistance(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0; i < front.getNumberOfPoints(); i++) { sum += Math.pow(FrontUtils.distanceToClosestPoint(front.getPoint(i), referenceFront), pow); } sum = Math.pow(sum, 1.0 / pow); return sum /...
java
public double generationalDistance(Front front, Front referenceFront) { double sum = 0.0; for (int i = 0; i < front.getNumberOfPoints(); i++) { sum += Math.pow(FrontUtils.distanceToClosestPoint(front.getPoint(i), referenceFront), pow); } sum = Math.pow(sum, 1.0 / pow); return sum /...
[ "public", "double", "generationalDistance", "(", "Front", "front", ",", "Front", "referenceFront", ")", "{", "double", "sum", "=", "0.0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "front", ".", "getNumberOfPoints", "(", ")", ";", "i", "++",...
Returns the generational distance value for a given front @param front The front @param referenceFront The reference pareto front
[ "Returns", "the", "generational", "distance", "value", "for", "a", "given", "front" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-core/src/main/java/org/uma/jmetal/qualityindicator/impl/GenerationalDistance.java#L82-L92
54,696
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.linear
public float linear(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= x[i - 1]; } if (m != 1) { result *= (1 - x[M - m]); } return result; }
java
public float linear(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= x[i - 1]; } if (m != 1) { result *= (1 - x[M - m]); } return result; }
[ "public", "float", "linear", "(", "float", "[", "]", "x", ",", "int", "m", ")", "{", "float", "result", "=", "(", "float", ")", "1.0", ";", "int", "M", "=", "x", ".", "length", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "M", "-"...
Calculate a linear shape
[ "Calculate", "a", "linear", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L16-L29
54,697
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.convex
public float convex(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= (1 - Math.cos(x[i - 1] * Math.PI * 0.5)); } if (m != 1) { result *= (1 - Math.sin(x[M - m] * Math.PI * 0.5)); } return result; }
java
public float convex(float[] x, int m) { float result = (float) 1.0; int M = x.length; for (int i = 1; i <= M - m; i++) { result *= (1 - Math.cos(x[i - 1] * Math.PI * 0.5)); } if (m != 1) { result *= (1 - Math.sin(x[M - m] * Math.PI * 0.5)); } return result; }
[ "public", "float", "convex", "(", "float", "[", "]", "x", ",", "int", "m", ")", "{", "float", "result", "=", "(", "float", ")", "1.0", ";", "int", "M", "=", "x", ".", "length", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<=", "M", "-"...
Calculate a convex shape
[ "Calculate", "a", "convex", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L34-L47
54,698
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.mixed
public float mixed(float[] x, int A, float alpha) { float tmp; tmp = (float) Math.cos((float) 2.0 * A * (float) Math.PI * x[0] + (float) Math.PI * (float) 0.5); tmp /= (2.0 * (float) A * Math.PI); return (float) Math.pow(((float) 1.0 - x[0] - tmp), alpha); }
java
public float mixed(float[] x, int A, float alpha) { float tmp; tmp = (float) Math.cos((float) 2.0 * A * (float) Math.PI * x[0] + (float) Math.PI * (float) 0.5); tmp /= (2.0 * (float) A * Math.PI); return (float) Math.pow(((float) 1.0 - x[0] - tmp), alpha); }
[ "public", "float", "mixed", "(", "float", "[", "]", "x", ",", "int", "A", ",", "float", "alpha", ")", "{", "float", "tmp", ";", "tmp", "=", "(", "float", ")", "Math", ".", "cos", "(", "(", "float", ")", "2.0", "*", "A", "*", "(", "float", ")"...
Calculate a mixed shape
[ "Calculate", "a", "mixed", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L70-L77
54,699
jMetal/jMetal
jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java
Shapes.disc
public float disc(float[] x, int A, float alpha, float beta) { float tmp; tmp = (float) Math.cos((float) A * Math.pow(x[0], beta) * Math.PI); return (float) 1.0 - (float) Math.pow(x[0], alpha) * (float) Math.pow(tmp, 2.0); }
java
public float disc(float[] x, int A, float alpha, float beta) { float tmp; tmp = (float) Math.cos((float) A * Math.pow(x[0], beta) * Math.PI); return (float) 1.0 - (float) Math.pow(x[0], alpha) * (float) Math.pow(tmp, 2.0); }
[ "public", "float", "disc", "(", "float", "[", "]", "x", ",", "int", "A", ",", "float", "alpha", ",", "float", "beta", ")", "{", "float", "tmp", ";", "tmp", "=", "(", "float", ")", "Math", ".", "cos", "(", "(", "float", ")", "A", "*", "Math", ...
Calculate a disc shape
[ "Calculate", "a", "disc", "shape" ]
bc981e6aede275d26c5216c9a01227d9675b0cf7
https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-problem/src/main/java/org/uma/jmetal/problem/multiobjective/wfg/Shapes.java#L82-L87